赶知识网

IIS10设置强制跳转https

2021-10-26 / 912次点击 OS/操作系统 IIS https ssl

IIS10设置强制跳转https。在web.config里增加如下这段设置:

<system.webServer>

        <rewrite>

            <rules>

                <rule name="https" stopProcessing="true">

                    <match url="(.*)" />

                    <conditions>

                        <add input="{HTTPS}" pattern="off" />

                    </conditions>

                    <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" />

                </rule>

            </rules>

        </rewrite>

  </system.webServer>


有用 没用

Top10

沪ICP备09053415号 © 赶知识网