Project

General

Profile

« Previous | Next » 

Revision 8476

bugfix: web/.htaccess: auto-add trailing / if not external redirect: match any path that does not end in / (and satisfies the -d lookahead), rather than only absolute filesystem paths, which are only applicable in inner .htaccess files (and even then only for the outermost dir they control) but not in the top-level .htaccess file. Note that the inner .htaccess files can still use ^/ to match their own dir, just not their subdirs, without a trailing / .

View differences:

.htaccess
45 45

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

  
51 51
# don't rewrite existing paths

Also available in: Unified diff