0
votes

I have multiple domains hosted on a single IP in IIS 8.5. I have added the two bindings, domain1.com and www.domain1.com to the site.

I wrote and easy rule to change the NON www (domain1.com) to www.domain1.com using a 301 redirect.

Now I have another domain, domain2.com, which I want to redirect to the first in the same rule. I added the rules where:

HTTP_HOST is domain2.com
HTTP_HOST is www.domain2.com

This worked in my previous setup in which all my sites were on separate IPs. Now they aren't. If had typed in any of the "other" 3, domain1.com, domain2.com or www.domain2.com, they had all redirected to www.domain1.com.

I even tried setting up two bindings in the site: domain2.com and www.domain2.com so it would listen for them.

I'm obviously missing something I have to do in the "multi" environment.

Any help would be great. Thanks.

1

1 Answers

0
votes

I figured out what I was doing wrong.

I ended up adding the bindings back into the site for domain2.com and www.domain2.com.

Then I added the 3 conditions for domain1.com, domain2.com and www.domain2.com to the existing rule.

The problem I had was that I had match ALL in the Conditions and had to change to match ANY.

Duh.