【发布时间】:2019-03-11 01:53:07
【问题描述】:
我正在创建一个重定向规则
www.<url>.com/overview to www.<url>.com/history
www.<url>.com/overview/history to www.<url>.com/history
<rule name="Overview" enabled="true" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{PATH_INFO}" pattern="^/overview" />
</conditions>
<action type="Redirect" url="www.<url>.com/history" appendQueryString="false" />
</rule>
<rule name="Overview-History" enabled="true" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{PATH_INFO}" pattern="^/overview/history" />
</conditions>
<action type="Redirect" url="www.<url>.com/history" appendQueryString="false" />
</rule>
上述规则有效,但有没有办法将两个 url 组合成一个规则,而不是创建两个不同的规则?
提前致谢
【问题讨论】: