Project

General

Profile

« Previous | Next » 

Revision 8056

web/main/.htaccess: translate dotpaths: Allow an unescaped . at the beginning of a filename, because this will never be a . separator. This adds support for hidden files in dir paths, which now won't be interpreted as dotpaths. However, regular files with extensions still need to have the filename escaped because it will otherwise be interpreted as a dotpath.

View differences:

.htaccess
44 44
# if no . suffix, seal /-path so the filename is not reinterpreted as a dotpath
45 45
# e.g. a/[b.c] -> a/[b.c]/ so it doesn't become a/b/c after []-unescaping
46 46
# this is needed because mod_rewrite often runs the same rules again
47
RewriteRule ^(.*/)?(?=.)([^./]*?)(?:\[([^\[\]/]*)\])?(?:\.([^/]*))?$ $1$2$3/$4 [discardpath,noescape,next]
47
RewriteRule ^(.*/)?(?=.)(\.?[^./]*?)(?:\[([^\[\]/]*)\])?(?:\.([^/]*))?$ $1$2$3/$4 [discardpath,noescape,next]
48 48
	# discardpath: avoids infinite loop by not reappending PATH_INFO (filename)
49 49

  
50 50
## specific to /

Also available in: Unified diff