Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-core/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
IIS重定向不工作3_Iis_Url Redirection_Url Rewrite Module - Fatal编程技术网

IIS重定向不工作3

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=

有人能解释一下为什么这个规则不起作用吗?当下面的查询字符串位于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>