0

I have a Windows 2008 server with two websites.

The first site has bindings for example1.com and www.example1.com.
The second site has bindings for example2.com and www.example2.com.

Each of them has an IIS rule that redirects to the www version of the URL. The problem is that when I go to example2.com, it redirects to www.example1.com. www.example2.com works correctly. I have double-checked the bindings several times. I even deleted the second site altogether. The non-www version redirects to www.example1.com, and the www version gives an error that the page does not exist. I have rechecked the bindings and the rules multiple times. Any ideas? Do the bindings or rules get stored or cached anywhere else?

Mike
  • 11
  • 1
  • 2

2 Answers2

1

I have found the solution to this issue. Both Firefox and Chrome cache 301 redirects. So, when I was testing the configuration prior to creating the second website's bindings, it cached them. Nothing that I was going to do on the server side would have fixed the problem until I cleared the cache on the browsers. Once I did clear the cache, everyone worked as expected.

Mike
  • 11
  • 1
  • 2
-1

Binding get saved in the metabase if I remember correctly. Try removing the site and re-setting it up. This should clear an inconsistencies with the bindings.

Tatas
  • 2,091
  • 1
  • 13
  • 19
  • I have dropped and recreated each website, and the same behavior occurs. – Mike Apr 04 '12 at 19:47
  • Sounds like a configuration issue. Can you list out what your redirect rule is, and exactly how you're doing it. URL Rewrite, etc? – Tatas Apr 04 '12 at 19:49
  • 1
    @Tatas : The metabase is an IIS6 feature. In IIS 7.0, all websites and their bindings are configured in `applicationHost.config` – Mathias R. Jessen Apr 04 '12 at 19:57