简体   繁体   English

URL重写问题-IIS7

[英]URL Rewriting Issue - IIS7

Hi I have a html website which just has some static content. 嗨,我有一个HTML网站,其中只有一些静态内容。 the website is hosted on iis 7 and its named as www.mywebsite.com. 该网站托管在iis 7上,其名称为www.mywebsite.com。 Everything works fine. 一切正常。 its just that when I type in mywebsite.com it was not redirecting to www.mywebsite.com so I setup the url rewrite rule for it in IIS and that works fine. 只是当我输入mywebsite.com时,它没有重定向到www.mywebsite.com,因此我在IIS中为其设置了URL重写规则,并且效果很好。 but when I type in http://mywebsite.com , it does not redirect to http://www.mywebsite.com even if I have the redirect rule in place. 但是当我输入http://mywebsite.com时 ,即使我有重定向规则,它也不会重定向到http://www.mywebsite.com I also tried using http redirect module and even that does not help. 我也尝试使用http重定向模块,即使这样也无济于事。 could somebody please help. 有人可以帮忙吗?

The rule that i have setup is in IIS directly so cant paste the code here. 我设置的规则直接在IIS中,因此无法在此处粘贴代码。 I am using the exact match pattern and specified the input url directly as 我正在使用完全匹配模式,并直接将输入网址指定为

http://mywebsite.com redirect to http://www.mywebsite.com . http://mywebsite.com重定向到http://www.mywebsite.com

找到答案后,我创建了另一个名为mywebsite.com的站点,并指向同一目录,然后重定向到实际站点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM