Revision 8482
Added by Aaron Marcuse-Kubitza over 11 years ago
web/.htaccess | ||
---|---|---|
43 | 43 |
RewriteCond %{REQUEST_URI} ^(.*?)(?:/index(?:\.\w+)?)?$ |
44 | 44 |
RewriteRule ^.*$ /dotpath%1 [discardpath,noescape,last,qsappend] |
45 | 45 |
|
46 |
# auto-add trailing / if not external redirect (limited form of DirectorySlash) |
|
47 |
RewriteCond %{REQUEST_FILENAME} -d [ornext] |
|
48 |
RewriteCond %{LA-F:REQUEST_FILENAME} -d |
|
49 |
RewriteRule ^.+(?<!/)$ %{REQUEST_URI}/ [discardpath,noescape,last,redirect,qsappend] |
|
50 |
|
|
51 | 46 |
# don't rewrite existing dirs with trailing / |
52 | 47 |
RewriteCond %{REQUEST_FILENAME} -d |
53 | 48 |
RewriteRule ^.+/$ - [discardpath,noescape,last,qsappend] |
... | ... | |
56 | 51 |
RewriteCond %{REQUEST_FILENAME} -f |
57 | 52 |
RewriteRule ^.+$ - [discardpath,noescape,last,qsappend] |
58 | 53 |
|
54 |
# auto-add trailing / if not external redirect (limited form of DirectorySlash) |
|
55 |
RewriteCond %{REQUEST_FILENAME} -d [ornext] |
|
56 |
RewriteCond %{LA-F:REQUEST_FILENAME} -d |
|
57 |
RewriteRule ^.+(?<!/)$ %{REQUEST_URI}/ [discardpath,noescape,last,redirect,qsappend] |
|
58 |
|
|
59 | 59 |
# handle DirectoryIndex subrequests when there is no DirectoryIndex |
60 | 60 |
# use -F subrequest so that MultiViews auto-appends any extension |
61 | 61 |
RewriteCond %{REQUEST_FILENAME} !-F |
Also available in: Unified diff
web/.htaccess: moved auto-add trailing / to after don't rewrite existing dirs, so that the path will automatically not be rewritten if it contains a trailing / and is a dir