在IIS中替换查询字符串参数名称
我想知道是否可以在IIS重写中替换查询字符串参数名 例如:在IIS中替换查询字符串参数名称,iis,url-rewriting,query-string,Iis,Url Rewriting,Query String,我想知道是否可以在IIS重写中替换查询字符串参数名 例如: http://www.old-site.com/searchresults?pId=77&page=3 到 除了将查询字符串(可以包含整个搜索条件数组)附加到重定向的url之外,我还需要将page的参数名更改为pageno 我当前规则的一个例子是: <rule name="Search Results" enabled="true" stopProcessing="true"> <match url=
http://www.old-site.com/searchresults?pId=77&page=3
到
除了将查询字符串(可以包含整个搜索条件数组)附加到重定向的url之外,我还需要将page的参数名更改为pageno
我当前规则的一个例子是:
<rule name="Search Results" enabled="true" stopProcessing="true">
<match url="^searchresults/?$" ignoreCase="true" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{QUERY_STRING}" pattern="page=(\d+)" />
</conditions>
<action type="Redirect" url="http://www.new-site.com?pageno={C:1}" appendQueryString="true" />
</rule>
我的问题是,我不知道我可以得到哪种搜索条件组合,但我想将它们附加到重定向的url中,用pageno替换页面
提前感谢您提供的任何信息/建议
<rule name="Search Results" enabled="true" stopProcessing="true">
<match url="^searchresults/?$" ignoreCase="true" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{QUERY_STRING}" pattern="page=(\d+)" />
</conditions>
<action type="Redirect" url="http://www.new-site.com?pageno={C:1}" appendQueryString="true" />
</rule>