IIS配置HTTP默认跳转到HTTPS

<rewrite>
    <rules>
        <rule name="HTTP to HTTPS redirect" stopProcessing="true">
            <match url="(.*)" />
            <conditions>
                <add input="{HTTPS}" pattern="off" />
            </conditions>
            <action type="Redirect" redirectType="Permanent" url="https://{HTTP_HOST}/{R:1}" />
        </rule>
    </rules>
</rewrite>

 

posted @ 2024-01-31 16:56  五百万  阅读(139)  评论(0编辑  收藏  举报