Project

General

Profile

« Previous | Next » 

Revision 8407

web/**/.htaccess: RewriteOptions: Redirect dir paths without the trailing / to the datasource's homepage, and let dir paths with the trailing / point to the directory index. This is the opposite of the way it was before, and is more intuitive because the trailing / indicates a directory listing, while the trailing / would generally be omitted when linking to the datasource itself.

View differences:

.htaccess
9 9
# don't rewrite existing paths
10 10
RewriteCond %{REQUEST_FILENAME} -d [ornext]
11 11
RewriteCond %{REQUEST_FILENAME} -f
12
RewriteRule ^.+$ - [discardpath,noescape,last]
12
RewriteRule ^(?!/).+$ - [discardpath,noescape,last]
13 13

  
14 14
# handle DirectoryIndex subrequests
15 15
RewriteRule ^index$() $1 [discardpath,noescape]
16 16

  
17 17
RedirectMatch ^/VegBIEN/Redmine/main$ https://projects.nceas.ucsb.edu/nceas/projects/bien/
18
RewriteRule ^.*$ dd/$0 [discardpath,noescape,last]
18
# dir without trailing / is provided as an absolute filesystem path
19
RewriteCond $0 ^/ [ornext]
20
RewriteCond /$0 ^(.*)$
21
RewriteRule ^.+$ dd%1 [discardpath,noescape,last]

Also available in: Unified diff