【发布时间】:2016-05-03 07:31:10
【问题描述】:
我想根据以下规则重定向我网站上的所有流量
https://www.test.com/abc -> https://www.test.com/test1.aspx?c=abc
https://www.test.com/def -> https://www.test.com/test1.aspx?c=def
子文件夹需要作为查询字符串传递
我已经试过了,但它似乎不起作用。
<rule name="Reditect1" stopProcessing="true">
<match url="^(.*)test.com/(.*)" />
<conditions>
<add input="{R:2}" pattern="^[a-zA-Z0-9_]*$" />
</conditions>
<action type="Redirect" url="/test1.aspx?c={C:0}" appendQueryString="true" />
</rule>
【问题讨论】:
标签: asp.net url-rewriting iis-7 iis-8 url-rewrite-module