IIS通过URL重写配置http跳转https,排除部分域名

<rewrite>
    <rules>
        <rule name="http to https" stopProcessing="true">
            <match url="(.*)" />
            <conditions>
                <add input="{HTTPS}" pattern="^OFF$" />
                <add input="{HTTP_HOST}" pattern="^要排除的域名$" negate="true" />
            </conditions>
            <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" />
        </rule>
    </rules>
</rewrite>

猜你喜欢

转载自www.cnblogs.com/wxb8/p/11992510.html