【发布时间】:2013-05-25 01:01:35
【问题描述】:
我想将来自http://www.example.com 的所有流量重定向到http://www.mysite.com/badreferer.aspx?bad=true
为此,我尝试在 IIS7 的 http://www.mysite.com 的 web.config 文件中创建规则。
<rule name="bad referer" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTP_REFERER}" pattern="(.*)example(.*)" />
</conditions>
<action type="Redirect" url="/badreferer.aspx?bad=true" appendQueryString="false" />
</rule>
但是重定向循环有问题。
请帮忙。
谢谢。
【问题讨论】:
标签: iis-7 url-rewriting http-referer url-redirection