ISAPI Rewrite 3.0 - any subdomain to subfolder...

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 2
Joined: 31 Mar 2013, 04:15

ISAPI Rewrite 3.0 - any subdomain to subfolder...

31 Mar 2013, 04:27

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 :)

User avatar
Posts: 2
Joined: 31 Mar 2013, 04:15

Re: ISAPI Rewrite 3.0 - any subdomain to subfolder...

31 Mar 2013, 21:45

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/

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: ISAPI Rewrite 3.0 - any subdomain to subfolder...

01 Apr 2013, 00:26

Hello,

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

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 16 guests