Created
October 11, 2015 07:49
-
-
Save faizanayubi/108094e3a86e2b05e040 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
putting this in your .htaccess file will add subdomain | |
RewriteEngine on | |
RewriteCond %{HTTP_HOST} ^sub.domain.com | |
RewriteRule ^(.*)$ http://domain.com/subdomains/sub/$1 [L,NC,QSA] | |
For a more general rule (that works with any subdomain, not just sub) replace the last two lines with this: | |
RewriteEngine on | |
RewriteCond %{HTTP_HOST} ^(.*)\.domain\.com | |
RewriteRule ^(.*)$ http://domain.com/subdomains/%1/$1 [L,NC,QSA] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment