IIS7 HTTP自动跳转HTTPS

主机路径 C:\inetpub\custerr\zh-CN\403.htm

把以下内容全部拷贝替换(403-4或403)里面所有内容,保存即可

<HTML><HEAD><TITLE>该页必须通过安全通道查看</TITLE>

<META HTTP-EQUIV="Content-Type" Content="text/html; charset=GB2312">

</HEAD><BODY>

<script type="text/javascript">

var url = window.location.href;

                if (url.indexOf("https") < 0) {

                    url = url.replace("http:", "https:");

                    window.location.replace(url);

                }

</script>

</BODY></HTML>

SSL设置-> 要求SSL 

 

 

 

 
 
posted @ 2022-07-29 16:40  微风吹过~  阅读(33)  评论(0编辑  收藏  举报