Project

General

Profile

« Previous | Next » 

Revision 9598

web/.htaccess: for dirs, redirect to index.*: allow requesting a mod_dir listing instead with ?index=1

View differences:

.htaccess
64 64
RewriteCond %{REQUEST_FILENAME}/.htaccess !-f
65 65
RewriteRule ^.+$ %{REQUEST_URI}/ [discardpath,last,noescape,qsappend,redirect]
66 66

  
67
# for dirs, redirect to index.*
67
# for dirs, redirect to index.* unless mod_dir listing requested with ?index=1
68 68
RewriteCond %{REQUEST_FILENAME}index -F
69 69
	# use -F subrequest so that MultiViews auto-appends any extension
70
RewriteCond %{QUERY_STRING} !(?:^|&)index=[^&]
70 71
RewriteRule ^(.*/)?$ $1index [discardpath,last,noescape,qsappend]
71 72

  
72 73
# prepend dir name if it's part of the filename (e.g. dir/file -> dir/dir.file)

Also available in: Unified diff