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
![](https://img2022.cnblogs.com/blog/1342504/202207/1342504-20220729163821089-1158781827.png)