Revision 8026
Added by Aaron Marcuse-Kubitza almost 12 years ago
web/main/.htaccess | ||
---|---|---|
25 | 25 |
|
26 | 26 |
## translate dotpaths (after the last /) to /-paths, e.g. d/a.[b.c] -> d/a/b.c/ |
27 | 27 |
# replace all unescaped . with / , e.g. a.[b.c] -> a/[b.c] |
28 |
# remove up to two [] escapes per dot-level, e.g. a.[b.c]=[d.e] -> a/b.c=d.e
|
|
29 |
RewriteCond $2 ^([^\[\]]*)(?:\[([^\[\]]*)\]([^\[\]]*))?(?:\[([^\[\]]*)\]([^\[\]]*))?$
|
|
28 |
# remove up to one [] escape per dot-level, e.g. a.b=[c.d] -> a/b=c.d
|
|
29 |
RewriteCond $2 ^([^\[\]]*)(?:\[([^\[\]]*)\]([^\[\]]*))?$ |
|
30 | 30 |
# if no . suffix, seal /-path so the filename is not reinterpreted as a dotpath |
31 | 31 |
# e.g. a/[b.c] -> a/[b.c]/ so it doesn't become a/b/c after []-unescaping |
32 | 32 |
# this is needed because mod_rewrite often runs the same rules again |
Also available in: Unified diff
web/main/.htaccess: translate dotpaths: Only support one [] escape per dot-level to (greatly) shorten the [] regexp. This does not pose a problem for encoding . because the entire level can simply be enclosed in [].