Project

General

Profile

« Previous | Next » 

Revision 8473

web/.htaccess: bugfix: moved auto-add trailing / if not external redirect to before don't rewrite existing paths because the trailing / also needs to be added on paths which are existing paths, but are just missing the trailing /

View differences:

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 $0 -F
48
RewriteRule ^/.*$() $1 [discardpath,noescape,last,redirect,qsappend]
49
	# ^/: dir without trailing / is provided as an absolute filesystem path
50

  
46 51
# don't rewrite existing paths
47 52
RewriteCond %{REQUEST_FILENAME} -d [ornext]
48 53
RewriteCond %{REQUEST_FILENAME} -f
......
53 58
RewriteCond %{REQUEST_FILENAME} !-F
54 59
RewriteRule ^(.*/)?index$ $1 [discardpath,noescape,qsappend]
55 60

  
56
# auto-add trailing / if not external redirect (limited form of DirectorySlash)
57
RewriteCond $0 -F
58
RewriteRule ^/.*$() $1 [discardpath,noescape,last,redirect,qsappend]
59
	# ^/: dir without trailing / is provided as an absolute filesystem path
60

  
61 61
## specific to /
62 62

  
63 63
RewriteCond %{ENV:innermost_dir} =/

Also available in: Unified diff