<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript">
var url = window.location.href;
url = url.replace("http://", "https://");
window.location.replace(url)
</script>
</head>
</html>
把上面的几行代码保存为403-4.htm文件并复制到硬盘任意位置
在IIS里,
请把443:4的错误映射属性中的消息类型选用“文件”,
并把文件指向403-4.htm存放的位置
搞定