1

我正在尝试将对特定目录的请求重定向到具有相同目录的不同域。代码按预期工作,只是即使与模式不匹配的请求也会被重定向。有什么我遗漏的东西,所以所有不匹配的请求都由服务器正常处理吗?

示例传入 URL 是http://www.inbounddomain.com/STRING2.NSF/some-really-long-file-name-that-needs-to-be-appended-to-the-redirect

<?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>
4

0 回答 0