Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # If we're not on http://example.com
- RewriteCond %{HTTP_HOST} .+.example.com
- # Add the host to the front of the URL and chain with the next rule
- RewriteRule ^(.*)$ ${HOST}$1 [C,QSA]
- # Make the host a directory
- RewriteRule ^(.*).example.com(.*)$ http://example.com/$1$2 [QSA]
- RewriteCond %{HTTP_HOST} ^([^.]+).example.com$
- RewriteRule ^ http://example.com/%1 [L,R]
- RewriteCond %{HTTP_HOST} ^([^.]+).example.com$
- RewriteRule ^ /%1%{REQUEST_URI} [L]
Add Comment
Please, Sign In to add comment