Revision 8432
Added by Aaron Marcuse-Kubitza over 11 years ago
.htaccess | ||
---|---|---|
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}%{REQUEST_URI} [discardpath,noescape,last]
|
|
28 |
RewriteRule ^.*$ %{REQUEST_SCHEME}://%2/${subdomain2path:%1}%{ENV:REQUEST_URI_NO_SLASH} [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
web/.htaccess: translate subdomain to path: Use new REQUEST_URI_NO_SLASH to avoid adding an automatic trailing / when a subdir was reached as a subdomain without a path (e.g. VegBank.vegpath.org), which should be equivalent to going to the subdir's homepage (vegpath.org/VegBank) rather than to its directory listing (vegpath.org/VegBank/ ; note the trailing /)