我正在尝试将特定目录的请求重定向到具有相同目录的其他域。代码按预期工作,但即使是与模式不匹配的请求也会被重定向。是否有我遗漏的东西,所以服务器正常处理所有不匹配的请求?
<?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>