projects
/
kevux.org-website
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d8eb8c6
)
Security: Hide all hidden directories behind a 404.
author
Kevin Day
<thekevinday@gmail.com>
Sat, 7 May 2022 21:49:05 +0000
(16:49 -0500)
committer
Kevin Day
<thekevinday@gmail.com>
Sat, 7 May 2022 21:49:05 +0000
(16:49 -0500)
Never use access denied for these.
Whether they exist or not, a 404 should be returned.
.htaccess
patch
|
blob
|
history
diff --git
a/.htaccess
b/.htaccess
index 5b69a3bee6fcd6a69785920a9288bcac2e75b56e..501a0295ef0a83afb637c7df1ece4929407b3040 100644
(file)
--- 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]