[英]Simple IIS 7 Rewrite rule not working
I've seen several blogs and questions which I believe match what I'm doing, but it's not working. 我看过几个博客和问题,我认为这些博客和问题与我的工作相符,但没有用。 URL Rewrite module is installed.
URL重写模块已安装。 I'm resetting IIS after I save this web.config file.
保存此web.config文件后,我将重置IIS。 I've tried using IIS's GUI as well with same results.
我尝试过使用IIS的GUI以及相同的结果。 Is there something else I'm not aware of?
还有其他我不知道的东西吗?
<rewrite>
<rules>
<rule name="Redirect domain.com to www" patternSyntax="ECMAScript" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^domain.us$" />
</conditions>
<action type="Redirect" url="http://www.domain.us/{R:0}" />
</rule>
</rules>
</rewrite>
Ok, I forgot to add the binding domain.us to the site. 好的,我忘记将绑定domain.us添加到该站点。 Woops!
哇!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.