IIS重定向不工作3
有人能解释一下为什么这个规则不起作用吗?当下面的查询字符串位于url中时,我需要一个永久重定向IIS重定向不工作3,iis,url-redirection,url-rewrite-module,Iis,Url Redirection,Url Rewrite Module,有人能解释一下为什么这个规则不起作用吗?当下面的查询字符串位于url中时,我需要一个永久重定向 <rule name="Telephony Document Lib Redirect" stopProcessing="true"> <match url="(.*)?RootFolder=%2FTechnology%2FShared%20Documents%2FTelephony(.*)" /> <action type="Redirect" url=
<rule name="Telephony Document Lib Redirect" stopProcessing="true">
<match url="(.*)?RootFolder=%2FTechnology%2FShared%20Documents%2FTelephony(.*)" />
<action type="Redirect" url="https://{HTTP_HOST}/sites/teams/Telephony" appendQueryString="false" redirectType="Permanent" />
</rule>
查询字符串与url是分开的,应该使用以下条件进行匹配:
<rule name="Telephony Document Lib Redirect" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{QUERY_STRING}" pattern="RootFolder=%2FTechnology%2FShared%20Documents%2FTelephony(.*)" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/sites/teams/Telephony" appendQueryString="false" redirectType="Permanent" />
</rule>