办公技巧
Office Skills联系我们
Contact us2021-5-17
IIS版本下,6.0和7.0及以上版本的设置方法有区别,IIS6.0中实现http跳转https方法是修改以下文件:C:\WINDOWS\Help\iisHelp\common\403-4.htm。IIS7.0及以上版本是路径:C:\inetpub\custerr\zh-CN\403.htm,修改的内容如下:
<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>
注意:IIS6中,站点属性-》目录安全性-》编辑中把“要求安全通道(SSL)”勾选上即可。 IIS7、IIS8中,SSL设置>把“要求SSL”勾选即可。