
Untitled
By: a guest on
Apr 16th, 2012 | syntax:
None | size: 0.45 KB | hits: 12 | expires: Never
RewriteEngine On
RewriteBase /
# redirects subX.subY.domain.com to /-client/subY/subX
RewriteCond %{REQUEST_URI} !^/-
RewriteCond %{HTTP_HOST} ^(www\.)?([^\.]+)\.([^\.]+)
RewriteCond %{DOCUMENT_ROOT}/-clients/%3/%2 -d
RewriteRule ^(.*)$ -clients/%3/%2/$1 [L]
# redirects subY.domain.com to /-client/subY/
RewriteCond %{REQUEST_URI} !^/-
RewriteCond %{HTTP_HOST} ^(www\.)?([^\.]+)
RewriteCond %{DOCUMENT_ROOT}/-clients/%2 -d
RewriteRule ^(.*)$ -clients/%2/$1 [L]