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 09a8fc329a Revert "Fix redirects from empty directories (2)"
09a8fc329a is described below

commit 09a8fc329aa24cadb36bfb9f8cd32cc37446fba3
Author: Piotr P. Karwasz <[email protected]>
AuthorDate: Fri May 24 20:53:36 2024 +0200

    Revert "Fix redirects from empty directories (2)"
    
    This reverts commit b0ffa9d48310bfee17e3030a07cad368784f951d.
---
 .htaccess | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/.htaccess b/.htaccess
index c0edee979c..ec2dfaf963 100644
--- a/.htaccess
+++ b/.htaccess
@@ -22,12 +22,13 @@ RewriteBase "/log4j/2.x/"
 ##
 # To simplify the redirection rules, we normalized them:
 #
-# 1. If the request URIs points to a directory, we add `index.html` to it
+# 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]
 # 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$"
-RewriteRule "^(+*)$" "$1.html"
+RewriteRule "^(.*)$" "$1.html"
 #
 # From this point rules match against the URI to the real file, with 
"/log4j/2.x/" stripped.
 

Reply via email to