URL重写-排除子站点

时间:2019-05-28 22:17:18

标签: windows iis

通过IIS,我需要将内部网站www.sitea.com转发到外部网站www.siteb.com。 URL重写以将www.sita.com/a设置为www.siteb.com可以正常工作。但是,我需要将www.sitea.com/login排除在重写到www.siteb.com之外。我不知道如何排除子目录。

重新排序URL重写规则。停止处理

 <rule name="login" stopProcessing="true">
                <match url="login" />
                <conditions logicalGrouping="MatchAll" 
 trackAllCaptures="false" />
                <action type="None" />
            </rule>
<rule name="\a" stopProcessing="true">
                <match url="a" />
                <conditions logicalGrouping="MatchAll" 
trackAllCaptures="false" />
                <action type="Redirect" url="http://www.siteb.com" 
appendQueryString="false" />
            </rule>
            <rule name="\b" stopProcessing="true">
                <match url="b" />
                <conditions logicalGrouping="MatchAll" 
trackAllCaptures="false" />
                <action type="Redirect" url="http://www.siteb.com" 
appendQueryString="false" />
            </rule>
            <rule name="\c" stopProcessing="true">
                <match url="c" />
                <conditions logicalGrouping="MatchAll" 
trackAllCaptures="false" />
                <action type="Redirect" url="http://www.siteb.com" 

appendQueryString =“ false” />                 

如果我添加了来自www.sitea.com的重写,它将覆盖豁免条款

0 个答案:

没有答案