I have a website running on a server in IIS6. The website is configured with two hostheader bindings on port 80:
- mywebsite1 <- requires an entry in local windows hosts file to fake a DNS entry
- mywebsite2.mydomain.com <- uses DNS
So, in theory using a web browser to access either:
...should both show the exact same website in my browser.
However, when I use IE9 to view http://mywebsite1/, the UserAgent that the browser sends to the web server is this:
Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+6.1;+Trident/5.0;+SLCC2;+.NET+CLR+2.0.50727;+.NET+CLR+3.5.30729;+.NET+CLR+3.0.30729;+Media+Center+PC+6.0;+Tablet+PC+2.0;+MS-RTC+LM+8;+OfficeLiveConnector.1.5;+OfficeLivePatch.1.3;+.NET4.0C)
But when I use IE9 to view http://mywebsite2.mydomain.com/, the UserAgent that the browser sends to the web server is this:
Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+Trident/5.0)
Why would IE9 send a different UserAgent string in these two situations? The browser is also emulating the rendering rules for these user agents, so this is causing nightmare CSS problems!
Additional info:
- I have included in the page head tag.
- The website is ASP.NET Framework 3.
- The web server is IIS 6.
- The web browser is IE9.
- (let me know if you want me to clarify anything else)