http转https实战教程iis7.5

在system.webServer 节点下

<rewrite>

            <rules>

                <rule name=”Redirect to https” stopProcessing=”true”>

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

                    <conditions>

                        <add input=”{HTTPS}” pattern=”^OFF$” />

                        <add input=”{HTTPS_HOST}” pattern=”^(localhost)” negate=”true” />

                    </conditions>

                    <action type=”Redirect” url=”https://{HTTP_HOST}:443/{R:1}” redirectType=”SeeOther” />

                </rule>

            </rules>

        </rewrite>

完成以上,我们的http转https就成功了

Leave a Comment

您的邮箱地址不会被公开。 必填项已用 * 标注