我想将我的旧url (../Galary.aspx?cat=10)重定向到新url(./夹克样式库),但它附加了旧参数。
<rule name="rule9" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{QUERY_STRING}" pattern="cat=10" />
</conditions>
<action type="Redirect" url="./jacket-style-gallery" appendQueryString="false"/>
</rule> 因此,它将"../jacket-style-gallery?cat=10"重定向到
发布于 2017-07-24 12:25:59
如果你只想要Galary.aspx
若要重定向,则应使用:
<rule name="rule9" stopProcessing="true">
<match url="Galary.aspx" />
<conditions>
<add input="{QUERY_STRING}" pattern="cat=10" />
</conditions>
<action type="Redirect" url="./jacket-style-gallery" appendQueryString="false"/>
</rule> 我刚在我的服务器上测试了一下,它可以工作了。
https://stackoverflow.com/questions/45280275
复制相似问题