Project

General

Profile

« Previous | Next » 

Revision 10612

bugfix: web/.htaccess: parse dotpath in query string: make dotpath replacement start with ./ instead of / (which would incorrectly create an absolute URL path). this bug only appears when there is a trailing /, because this causes the matched text to be empty instead of a filesystem path with leading /.

View differences:

web/.htaccess
44 44
RewriteRule ^ ?.%{QUERY_STRING} [discardpath,noescape]
45 45

  
46 46
## parse dotpath in query string
47
# make dotpath replacement start with ./ instead of /
48
RewriteCond %{QUERY_STRING} ^\.
49
RewriteRule ^$ . [discardpath,noescape,qsappend]
47 50
# parse dotpath levels repeatedly in QUERY_STRING
48 51
RewriteCond %{QUERY_STRING} ^\.([^./&]*?)(?:\[([^\[\]/&]*)\])?([.&].*)?$
49 52
RewriteRule ^(.*?)(?:/(?:index(?:\.\w+)?)?)?$ $1/%1%2?%3 [discardpath,noescape,next,env=needs_redirect:1]

Also available in: Unified diff