参数为';的URL的IIS URL重写301重定向;行不通
我有以下301重定向规则:参数为';的URL的IIS URL重写301重定向;行不通,iis,parameters,query-string,url-rewrite-module,Iis,Parameters,Query String,Url Rewrite Module,我有以下301重定向规则: <rule name="301RedirectsRule" enabled="true" stopProcessing="true"> <match url=".*" /> <conditions logicalGrouping="MatchAll"> <add input="{301Redirects:{URL}}" pattern="(.+)" /> </conditions&
<rule name="301RedirectsRule" enabled="true" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{301Redirects:{URL}}" pattern="(.+)" />
</conditions>
<action type="Redirect" url="{C:1}" redirectType="Permanent" />
</rule>
在“重写映射”中有以下规则:
<add key="/di/web/home/Glossary/index.aspx" value="/resources/dental-terminology" />
<add key="/di/web/knowledge-base/article.aspx?id=62" value="/resources/oral-pathology/oral-conditions-and-diseases/periodontal-disease" />
第一个可以很好地工作,但是任何带有参数的URL(如第二个)都不能工作。我没有完全跟上IIS重写模块的速度,但是您可以尝试将
{301Redirects:{URL}}
替换为{301Redirects:{REQUEST\u URI}
我相信第一个不包含查询字符串