[英]IIS Rewrite: redirect with one of the query string parameters as part or the URL
[英]IIS Redirect one URL with query string to another with a new query string
我正在摸索,寻找一种在IIS中将具有特定查询字符串的URL重定向到具有新特定查询字符串的URL的方法。
例子-
http://example.com/10/list_display.asp?a=b- > http://example.com/display.asp?c=d
有关如何执行此操作的任何线索-我们预先知道新旧查询字符串应该是什么,因此要避免使用正则表达式。
谢谢,肖恩
添加
<rule name="Rewrite rule1" stopProcessing="true">
<match url="10/list_display.asp" />
<conditions>
<add input="{QUERY_STRING}" pattern="profession=2599" />
<add input="{QUERY_STRING}" pattern="country=The*" />
</conditions>
<action type="Redirect" url="the-redirect.aspx" appendQueryString="false" />
</rule>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.