开发者

Weird IIS7 http redirection behavior

I have a web server running Windows Server 2008 with IIS7. I have a bunch of websites which are all bound to the same IP address, but with different host header values. Most of the host headers are something like www.sitename.com.

I also have a corresponding website entry for each which listens for the host "sitename.com" and does a redirect to "www.sitename.com" within IIS7 (to cater for non-www开发者_运维问答 requests). Now this is all pretty straight forward, but I've noticed the when setting up the Http Redirection, some wierd things happen:

Firstly, the "redirect" website entries must be pointed at a different physical directory than the site it's trying to redirect to, otherwise the redirection settings get set for both sites at once.

Secondly, sometimes whilst setting up Http Redirection on an individual site, Http Redirection gets set at a server level, and all sites start redirecting to that one URL.

How does this happen? Under what circumstances could setting Http Redirection on an individual site affect all sites? This is scary!!!


You need to point each of the websites to different physical location so that Http Redirection module can make a webconfig file for each of them.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜