0

I've install ISAPI_Rewrite on IIS server.

And i want to rewrite *.site1.com to www.site1.com/* & *.site2.com to www.site2.com/*

Here's the code i use in httpd.ini:

[ISAPI_Rewrite]
RewriteCond Host:^*.site1.com$
RewriteRule ^(.*)$ /www.site1.com/$1 [I,L]

RewriteCond Host:^*.site2.com$
RewriteRule ^(.*)$ /www.site2.com/$1 [I,L]

But is is only work for site1.com only and cannot use site2.com's RewriteRule. (if i visit 123.site2.com it rewrite www.site1.com/123)

I want that if i visit 123.site1.com it rewrite to www.site1.com/123 and if i visit 456.site2.com it rewrite to www.site2.com/456

Can anyone help me with this?

He Yifei 何一非
  • 2,592
  • 4
  • 38
  • 69

1 Answers1

0

If the rules are identical and the sites are located on the same server with the same configurations, please, check your DNS entries and make sure the rule is being applied to a corresponding site.

Andrew
  • 511
  • 3
  • 7