IIS重写捕获所有请求而不是匹配模式

IIS重写捕获所有请求而不是匹配模式,iis,redirect,rewrite,Iis,Redirect,Rewrite,我正在尝试将特定目录的请求重定向到具有相同目录的不同域。代码按预期工作,但即使是与模式不匹配的请求也会被重定向。我是否缺少一些东西,所以所有不匹配的请求都由服务器正常处理 示例传入URL为 <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <handlers> <add name="Mod-Rewrite" path="*

我正在尝试将特定目录的请求重定向到具有相同目录的不同域。代码按预期工作,但即使是与模式不匹配的请求也会被重定向。我是否缺少一些东西,所以所有不匹配的请求都由服务器正常处理

示例传入URL为

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
    <handlers>
        <add name="Mod-Rewrite" path="*" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\SysWOW64\inetsrv\imodrewi.dll" resourceType="Unspecified" requireAccess="None" preCondition="bitness64" />
    </handlers>

<rewrite>
<rules>
<rule name="Redirect for STRING2.NSF" enabled="false" stopProcessing="true">
  <match url="(.*?)(?:STRING2.NSF/|$)(.*)" />
  <action type="Redirect" url="http://www.redirectdomain.com/STRING2.NSF/{R:2}" redirectType="Permanent" />
</rule>
</rules>
</rewrite>

    </system.webServer>
</configuration>