新梦想网络 > 客服中心 > 独立服务器 > 正文缩放字号: [收藏本问题]

iis 6.0设置实现http转向 https的解决方案(win2003)

时间:2014-10-11来源:新梦想网络 作者:新梦想网络 点击:
首先错误信息见图:

解决方法:
一、验证SSL需要选中的网站

1、首先打开所要修改的网站然后右击选择“属性”
2、选择“目录安全性”-->在安全通信中选择“编辑”
3、选择“要求安全通信(SSL)”后点击“确定”。
二、创建一个HttpRedirect.htm 文件保存到“C:\InetPub”
HttpRedirect.htm中的代码:
<!-- beginning of HttpRedirect.htm file -->
<script type="text/javascript">
function redirectToHttps()
{
var httpURL = window.location.hostname + window.location.pathname;
var httpsURL = "https://" + httpURL ;
window.location = httpsURL ;
}
redirectToHttps();
</script>
<!-- end of HttpRedirect.htm file -->

三、用HttpRedirect.htm文件替换403文件

1、打开你的网站右击选择“属性”
2、选择“自定义错误”点击编辑
3、在“文件”中添加HttpRedirect.htm文件(路径为:C:\Inetpub\HttpRedirect.htm)
四、测试
输入的网址:http://会自动跳转到https://
 

    TAG:

    下载此文章 (欢迎转载,请注明出处:http://www.xmxwl.net/help/member/20141011/13400.html)