Revision 8023
Added by Aaron Marcuse-Kubitza almost 12 years ago
.htaccess | ||
---|---|---|
27 | 27 |
|
28 | 28 |
# replace all unescaped . with / , e.g. a.[b.c] -> a/[b.c] |
29 | 29 |
# remove up to two [] escapes per dot-level, e.g. a.[b.c]=[d.e] -> a/b.c=d.e |
30 |
RewriteCond $2 ^(.*)(?:\[([^\[\]]*)\](.*))?(?:\[([^\[\]]*)\](.*))?$
|
|
31 |
RewriteRule ^((?:.*/)?(?:[^.\[\]/]*|\[[^\[\]/]*\])*)\.([^/]*)$ $1/%1%2%3%4%5 [discardpath,noescape,next]
|
|
30 |
RewriteCond $2 ^([^\[\]]*)(?:\[([^\[\]]*)\]([^\[\]]*))?(?:\[([^\[\]]*)\]([^\[\]]*))?$
|
|
31 |
RewriteRule ^(.*/)?((?:[^.\[\]/]+|\[[^\[\]/]*\])+)(?:\.([^/]*))?$ $1%1%2%3%4%5/$3 [discardpath,noescape,next]
|
|
32 | 32 |
# discardpath: avoids infinite loop with paths like a/b.c |
33 | 33 |
|
34 | 34 |
# seal the /-path so the filename part is not reinterpreted as a dotpath |
... | ... | |
38 | 38 |
|
39 | 39 |
|
40 | 40 |
# non-filesystem paths |
41 |
ErrorDocument 404 / |
|
41 |
#ErrorDocument 404 / |
Also available in: Unified diff
web/main/.htaccess: translate dotpaths: Fixed bug where it's actually the portion before the . (but after the last /) that should be subject to []-unescaping, rather than the portion after the . . Fixed bug where [] escapes were not being unescaped because the wildcard .* group matched the whole head portion instead of allowing the []-captures to match.