Project

General

Profile

« Previous | Next » 

Revision 10670

bugfix: web/.htaccess: auto-detect dotpath in query string: need to include the path ($0) in the replacement, to avoid reverting to the root dir. (mod_rewrite replacements are not like relative URLs, which would interpret ?... as being relative to the current path, not the root.)

View differences:

.htaccess
41 41
# you can prepend . to force a dotpath, or & to force a query param
42 42
RewriteCond %{QUERY_STRING} ^(?!\.)[^&]+$
43 43
RewriteCond %0 ^[^=]*(?:\.|$)
44
RewriteRule ^ ?.%{QUERY_STRING} [discardpath,noescape]
44
RewriteRule ^.*$ $0?.%{QUERY_STRING} [discardpath,noescape]
45 45

  
46 46
## parse dotpath in query string
47 47
# make dotpath replacement start with ./ instead of /

Also available in: Unified diff