<rule name="blog" stopProcessing="true">
<match url="en/blog.aspx?Id=9" />
<action type="Redirect" url="http://www.mynewurl.com" redirectType="Permanent" />
</rule>
我可以重定向“en/blog.aspx”,但无法仅重定向“en/blog.aspx?Id=9”。
有任何想法吗?
终于找到了解决办法:
/en/blog.aspx?Id=9 将重定向到http://www.newurl.com http://www.newurl.com.
<rule name="blog" stopProcessing="true">
<match url="en/blog.aspx$" />
<conditions>
<add input="{QUERY_STRING}" pattern="Id=9" />
</conditions>
<action type="Redirect" url="http://www.newurl.com" redirectType="Permanent" />
</rule>
在这里找到了解决方案:301 重定向在 IIS 7 中不起作用 https://stackoverflow.com/questions/8833259/301-redirect-not-working-in-iis-7
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)