Project

General

Profile

« Previous | Next » 

Revision 8439

web/.htaccess: Renamed $REQUEST_URI_NO_SLASH to $REQUEST_URI_no_/ to take advantage of (some) special chars being allowed in env var names

View differences:

.htaccess
20 20
# set REQUEST_URI_NO_SLASH
21 21
RewriteCond %{REQUEST_URI} ^/$ [ornext]
22 22
RewriteCond %{REQUEST_URI} ^(.*)$
23
RewriteRule ^.*$ - [discardpath,env=REQUEST_URI_NO_SLASH:%1,noescape]
23
RewriteRule ^.*$ - [discardpath,env=REQUEST_URI_no_/:%1,noescape]
24 24

  
25 25
# translate subdomain to path
26 26
RewriteCond %{HTTP_HOST} !=vegbiendev.nceas.ucsb.edu
27 27
RewriteCond %{HTTP_HOST} ^(.*)\.([^.]*\.[^.]*)$
28
RewriteRule ^.*$ %{REQUEST_SCHEME}://%2/${subdomain2path:%1}%{ENV:REQUEST_URI_NO_SLASH} [discardpath,noescape,last]
28
RewriteRule ^.*$ %{REQUEST_SCHEME}://%2/${subdomain2path:%1}%{ENV:REQUEST_URI_no_/} [discardpath,noescape,last]
29 29

  
30 30
# use separate lowercase version when available
31 31
RewriteCond %{DOCUMENT_ROOT}/$1 !-d

Also available in: Unified diff