ISAPI Rewrite 3.0 - any subdomain to subfolder...
3 posts
• Page 1 of 1
ISAPI Rewrite 3.0 - any subdomain to subfolder...
I am trying to do a rewrite in ISAPI Rewrite 3.0 to do the following:
subdomain.domain.com to domain.com/web/subdomain/webpages
Can some one help please, I have look all over google and nothing seems to work... Thanks![Smile :)](./images/smilies/icon_e_smile.gif)
subdomain.domain.com to domain.com/web/subdomain/webpages
Can some one help please, I have look all over google and nothing seems to work... Thanks
![Smile :)](./images/smilies/icon_e_smile.gif)
Re: ISAPI Rewrite 3.0 - any subdomain to subfolder...
Does any one knows the answer to this or is it not possible!!! I just want any subdomain to point to a folder with the same name as the subdomain but with in a folder called web... So for example:
anysubdomain.mydomain.com to mydomain.com/web/anysubdomain/index.htm
so anysubdomain would rewrite to a folder of the same name.. So, dev.mydomain.com to mydomain.com/web/dev/
anysubdomain.mydomain.com to mydomain.com/web/anysubdomain/index.htm
so anysubdomain would rewrite to a folder of the same name.. So, dev.mydomain.com to mydomain.com/web/dev/
- HeliconAndrew
-
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: ISAPI Rewrite 3.0 - any subdomain to subfolder...
Hello,
Try using:
Regards
Andrew
Try using:
- Code: Select all
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP:Host} !^www\..*$
RewriteCond %{HTTP:Host} !^([^.]+)\.domain\.com$ [NC]
RewriteRule .? http://www.domain.com/web/%1/index.htm [NC,P,L]
Regards
Andrew
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 16 guests