Project

General

Profile

« Previous | Next » 

Revision 8474

bugfix: web/.htaccess: auto-add trailing / if not external redirect: use "%{LA-F:REQUEST_FILENAME} d" instead of "$0 -F" so that the actual value of REQUEST_FILENAME tested, and $0 can also match strings which are not file paths. This is because only those no-trailing/-paths which did not match the RewriteBase are provided to mod_rewrite as absolute filepaths, but RewriteBase is not an issue in the outermost .htaccess (because the RewriteBase is / , which is always matched). This means the method of testing for ^/ to match a no-trailing-/-path will only work in inner .htaccess files (where it is currently used extensively).

View differences:

web/.htaccess
44 44
RewriteRule ^.*$ /dotpath%1 [discardpath,noescape,last,qsappend]
45 45

  
46 46
# auto-add trailing / if not external redirect (limited form of DirectorySlash)
47
RewriteCond $0 -F
47
RewriteCond %{LA-F:REQUEST_FILENAME} -d
48 48
RewriteRule ^/.*$() $1 [discardpath,noescape,last,redirect,qsappend]
49 49
	# ^/: dir without trailing / is provided as an absolute filesystem path
50 50

  

Also available in: Unified diff