当前位置:论坛首页 > Windows面板 > 讨论

看到有人要,分享一下IIS win面板强制https

发表在 Windows面板2017-12-10 08:00 [复制链接] 2 5626

只需要在网站设置中,“配置文件”配置一下就行了

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="HTTP to HTTPS redirect" stopProcessing="true">
                    <match url="(.*)" ></match>
                    <conditions>
                        <add input="{HTTPS}" pattern="^OFF$" ></add>
                    </conditions>
                    <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" ></action>
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

使用道具 举报 只看该作者 回复
发表于 2018-1-3 19:49:27 | 显示全部楼层
这个精神要发扬~
使用道具 举报 回复 支持 反对
发表于 2019-1-10 16:43:53 | 显示全部楼层
修改配置文件直接500错误
使用道具 举报 回复 支持 反对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

企业版年付运维跟进群

普通问题处理

论坛响应时间:72小时

问题处理方式:排队(仅解答)

工作时间:白班:9:00 - 18:00

紧急问题处理

论坛响应时间:10分钟

问题处理方式:1对1处理(优先)

工作时间:白班:9:00 - 18:00

工作时间:晚班:18:00 - 24:00

立即付费处理

工作时间:09:00至24:00

快速回复 返回顶部 返回列表