Project

General

Profile

« Previous | Next » 

Revision 8015

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.

View differences:

.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