Project

General

Profile

« Previous | Next » 

Revision 8481

web/.htaccess: don't rewrite existing paths: only prevent existing dirs with trailing / from being rewritten, because dirs without trailing / may be redirected

View differences:

.htaccess
48 48
RewriteCond %{LA-F:REQUEST_FILENAME} -d
49 49
RewriteRule ^.+(?<!/)$ %{REQUEST_URI}/ [discardpath,noescape,last,redirect,qsappend]
50 50

  
51
# don't rewrite existing paths
52
RewriteCond %{REQUEST_FILENAME} -d [ornext]
51
# don't rewrite existing dirs with trailing /
52
RewriteCond %{REQUEST_FILENAME} -d
53
RewriteRule ^.+/$ - [discardpath,noescape,last,qsappend]
54

  
55
# don't rewrite existing files
53 56
RewriteCond %{REQUEST_FILENAME} -f
54
RewriteRule ^(?!/).+$ - [discardpath,noescape,last,qsappend]
57
RewriteRule ^.+$ - [discardpath,noescape,last,qsappend]
55 58

  
56 59
# handle DirectoryIndex subrequests when there is no DirectoryIndex
57 60
# use -F subrequest so that MultiViews auto-appends any extension

Also available in: Unified diff