Revision 8027
Added by Aaron Marcuse-Kubitza almost 12 years ago
.htaccess | ||
---|---|---|
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 |
33 |
RewriteRule ^(.*/)?((?:[^.\[\]/]+|\[[^\[\]/]*\])+)(?:\.([^/]*))?$ $1%1%2%3%4%5/$3 [discardpath,noescape,next]
|
|
33 |
RewriteRule ^(.*/)?((?=.)(?:[^.\[\]/]*|\[[^\[\]/]*\])*)(?:\.([^/]*))?$ $1%1%2%3%4%5/$3 [discardpath,noescape,next]
|
|
34 | 34 |
# discardpath: avoids infinite loop with paths like a/b.c |
35 | 35 |
|
36 | 36 |
# non-filesystem paths |
Also available in: Unified diff
web/main/.htaccess: translate dotpaths: Use a lookahead assertion to ensure that at least one character is matched as the head of the dotpath. This ensures that (.*/)? + the rest of the regexp does not match a path with a trailing /, which is a sealed /-path and not subject to dotpath translation.