IIS使用新查询字符串将带有查询字符串的一个URL重定向到另一个URL

时间:2013-11-14 12:36:10

标签: iis redirect

我正在寻找一种方法,将一个具有特定查询字符串的URL重定向到另一个具有IIS中新特定查询字符串的URL。

示例 -

http://example.com/10/list_display.asp?a=b - > http://example.com/display.asp?c=d

有关如何执行此操作的任何线索 - 我们事先知道旧的和新的查询字符串应该是什么,因此要避免使用正则表达式。

谢谢, 肖恩

1 个答案:

答案 0 :(得分:0)

添加

<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>
相关问题