From: Kevin Day Date: Sat, 7 May 2022 21:49:05 +0000 (-0500) Subject: Security: Hide all hidden directories behind a 404. X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=80b47e5a76db5bb931c31a2b4091c1c4268a22c4;p=kevux.org-website Security: Hide all hidden directories behind a 404. Never use access denied for these. Whether they exist or not, a 404 should be returned. --- diff --git a/.htaccess b/.htaccess index 5b69a3b..501a029 100644 --- a/.htaccess +++ b/.htaccess @@ -3,6 +3,9 @@ RewriteEngine on ErrorDocument 403 /access_denied.html ErrorDocument 404 /not_found.html +RewriteBase "/" +RewriteRule (^\.|/\.) /not_found.html [L] + RewriteCond %{REQUEST_FILENAME} -f RewriteRule . - [L]