File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 11<IfModule mod_rewrite.c >
22 RewriteEngine On
33
4- # 0) Let real files/dirs pass through
5- RewriteCond %{REQUEST_FILENAME} -f [OR]
6- RewriteCond %{REQUEST_FILENAME} -d
7- RewriteRule ^ - [L]
4+
85
96 # 1) If a directory-style path has an index.html, serve it
107 # (works for any depth, with or without a trailing slash)
118 RewriteCond %{REQUEST_FILENAME}/index.html -f
129 RewriteRule ^(.+?)/?$ $1/index.html [L]
1310
11+ # 0) Let real files/dirs pass through
12+ RewriteCond %{REQUEST_FILENAME} -f [OR]
13+ RewriteCond %{REQUEST_FILENAME} -d
14+ RewriteRule ^ - [L]
15+
1416 # 2) Canonicalize: if index.html exists but URL lacks trailing slash, redirect to add it
1517 RewriteCond %{REQUEST_FILENAME} !-f
1618 RewriteCond %{REQUEST_FILENAME}/index.html -f
You can’t perform that action at this time.
0 commit comments