Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
Do they share the same physical path, the 2 website root applications? –  Mathias R. Jessen Apr 4 '12 at 18:42
    
No, they go to two different paths. –  Mike Apr 4 '12 at 19:46
1  
Try posting the effective website configuration. You can list it with: appcmd.exe list config -section:system.applicationHost/sites. appcmd.exe is found in C:\Windows\System32\inetsrv –  Mathias R. Jessen Apr 4 '12 at 19:59
add comment

2 Answers

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.

share|improve this answer
add comment

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.

share|improve this answer
    
I have dropped and recreated each website, and the same behavior occurs. –  Mike Apr 4 '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 4 '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 4 '12 at 19:57
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.