Revision 8015
Added by Aaron Marcuse-Kubitza almost 12 years ago
.htaccess | ||
---|---|---|
28 | 28 |
## translate dotpaths (after the last /) to /-paths, e.g. d/a.[b.c] -> d/a/b.c/ |
29 | 29 |
|
30 | 30 |
# replace all unescaped . with / , e.g. a.[b.c] -> a/[b.c] |
31 |
RewriteRule ^((?:.*/)?(?:[^.\[\]/]+|\[[^\[\]/]*\])+)\.([^/]+)$ $1/$2 [discardpath,noescape,next]
|
|
31 |
RewriteRule ^((?:.*/)?(?:[^.\[\]/]*|\[[^\[\]/]*\])*)\.([^/]*)$ $1/$2 [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 |
Also available in: Unified diff
web/main/.htaccess: translate dotpaths: replace all unescaped . with / : Allow empty components on either side of the . , to ensure that all unescaped dots are consistently replaced with / . Note that hidden directories that start with . will have the . preserved, because they have (or get) a trailing slash, which prevents dotpath from operating on them.