Revision 8491
Added by Aaron Marcuse-Kubitza over 11 years ago
.htaccess | ||
---|---|---|
37 | 37 |
RewriteRule ^([^/]*)(.*)$ %0$2 [discardpath,noescape,last,qsappend] |
38 | 38 |
# last: rewrite in the new subdir instead of applying this dir's rules |
39 | 39 |
|
40 |
# parse dotpath in the query string |
|
40 |
# parse dotpath in query string (having a . before any = ) |
|
41 |
# you can prepend . to force a dotpath, or & to force a query param |
|
41 | 42 |
RewriteRule ^dotpath - [discardpath,noescape,last,qsappend] |
42 |
RewriteCond %{QUERY_STRING} ^(?!&).+$ |
|
43 |
RewriteCond %{QUERY_STRING} ^[^&]+ |
|
44 |
RewriteCond %0 ^[^=]*(?:\.|$) |
|
43 | 45 |
RewriteCond %{REQUEST_URI} ^(.*?)(?:/index(?:\.\w+)?)?$ |
44 | 46 |
RewriteRule ^.*$ /dotpath%1 [discardpath,noescape,last,qsappend] |
45 | 47 |
|
Also available in: Unified diff
web/.htaccess: parse dotpath in query string: heuristically detect query strings that don't contain dotpaths (such as mod_autoindex sort conditions), rather than always interpreting the part before the first & as the dotpath. now, the part before the first & will be interpreted as a dotpath if it has a . before any = . (query param names containing . are rare, so this usually works correctly.) note that you can always prepend . to force a dotpath, or & to force a query param.