diff --git a/apps/drupal/drupal.conf b/apps/drupal/drupal.conf index 0679bf48..a3571b0e 100644 --- a/apps/drupal/drupal.conf +++ b/apps/drupal/drupal.conf @@ -212,7 +212,11 @@ location / { ## .htaccess. Disable access to any code files. Return a 404 to curtail ## information disclosure. Hide also the text files. location ~* ^(?:.+\.(?:htaccess|make|txt|engine|inc|info|install|module|profile|po|pot|sh|.*sql|test|theme|tpl(?:\.php)?|xtmpl)|code-style\.pl|/Entries.*|/Repository|/Root|/Tag|/Template)$ { - return 404; + if (-e $request_filename) { + return 404; + } + error_page 418 = @drupal; + return 418; } ## First we try the URI and relay to the /index.php?q=$uri&$args if not found.