This is an automated email from the ASF dual-hosted git repository.
pkarwasz pushed a commit to branch 2.x-site-stg-out
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
The following commit(s) were added to refs/heads/2.x-site-stg-out by this push:
new e44d39617b Fix redirects from empty legacy directories
e44d39617b is described below
commit e44d39617bf1a4dd148908c1131c2ed4ea396789
Author: Piotr P. Karwasz <[email protected]>
AuthorDate: Fri May 24 20:38:24 2024 +0200
Fix redirects from empty legacy directories
---
.htaccess | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/.htaccess b/.htaccess
index ec2dfaf963..96f9118a1e 100644
--- a/.htaccess
+++ b/.htaccess
@@ -22,9 +22,8 @@ RewriteBase "/log4j/2.x/"
##
# To simplify the redirection rules, we normalized them:
#
-# 1. If the request URIs points to a (non-existent) directory, we add
`index.html` to it
-RewriteCond %{REQUEST_FILENAME} !-d
-RewriteRule "^(.*)/$" "$1/index.html" [DPI]
+# 1. If the request URIs points to a directory, we add `index.html` to it
+RewriteRule "^(.*/)$" "$1index.html" [DPI]
# 2. If the request URI points to a (non-existent) file, we make sure it ends
with `.html`:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond $1 "!\.html$"