IIS URL重写-IIS 7
我不熟悉使用IIS Url重写。我安装了它,并使用IIS设置了一个规则,但当我尝试访问本地主机中的url时,什么也没有发生。下面是IIS放在my web.config中的内容。当我访问这个url mysite/srcc_development_2012/login/default.aspx时,根据我设置的规则,它应该重定向到google,但它不起作用。我错过了什么IIS URL重写-IIS 7,url,iis,rewrite,Url,Iis,Rewrite,我不熟悉使用IIS Url重写。我安装了它,并使用IIS设置了一个规则,但当我尝试访问本地主机中的url时,什么也没有发生。下面是IIS放在my web.config中的内容。当我访问这个url mysite/srcc_development_2012/login/default.aspx时,根据我设置的规则,它应该重定向到google,但它不起作用。我错过了什么 <rewrite> <rules> <rule nam
<rewrite>
<rules>
<rule name="SRCC" patternSyntax="Wildcard" stopProcessing="true">
<match url="mysite/srcc_development_2012/*" />
<action type="Redirect" url="http://www.google.com" />
<conditions logicalGrouping="MatchAny">
</conditions>
</rule>
</rules>
</rewrite>
我知道这是一个较旧的线程,但它没有应答,并显示在搜索中 以下是我将如何做到这一点:
<rewrite>
<rules>
<rule name="SRCC" stopProcessing="true">
<match url="(.*)" ignoreCase="true" />
<conditions>
<add input="{URL}" pattern="^srcc_development_2012(.*)?" />
</conditions>
<action type="Redirect" url="http://www.google.com" />
</rule>
</rules>
</rewrite>
中的值是域之后的值(stackoverflow.com/THIS/is/The-URL,其中stackoverflow.com是{HTTP_HOST}(但我们不使用此规则))。下面的值应该可以使用: 但请确保将此规则添加到登录文件夹
<rule name="redirect" stopProcessing="true">
<match url=".*" />
<action type="Redirect" url="https://google.com" />
</rule>