Advertisement
kazlik

subdomains

Sep 1st, 2013
340
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. RewriteEngine On
  2. RewriteCond %{HTTP_HOST} ^(www\.)?(.*)$ [NC]
  3. RewriteCond %{DOCUMENT_ROOT}/web/%2-www/ -d
  4. RewriteCond %{REQUEST_URI} !^/web/
  5. RewriteRule (.*) /web/%2-www/$1 [QSA,DPI]
  6.  
  7. RewriteCond %{HTTP_HOST} ^(www\.)?([^\.]+)\.(.*)$ [NC]
  8. RewriteCond %{DOCUMENT_ROOT}/web/%3-%2/ -d
  9. RewriteCond %{REQUEST_URI} !^/web/
  10. RewriteRule (.*) /web/%3-%2/$1 [QSA,DPI]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement