Project

General

Profile

« Previous | Next » 

Revision 10610

bugfix: web/.htaccess: parse dotpath in query string: need to add trailing / if dotpath so that dest path is URL path, not filesystem path (when trailing / missing, matched path is filesystem path)

View differences:

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

  
46 46
## parse dotpath in query string
47
# add trailing / if dotpath so that dest path is URL path, not filesystem path
48
RewriteCond %{QUERY_STRING} ^\.
49
RewriteRule ^/ %{REQUEST_URI}/ [discardpath,last,noescape,qsappend,redirect]
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