zoukankan      html  css  js  c++  java
  • iis 6.0 http转向 https(很简单)

    在网上找了好多资料都没找到,无意当中找的了一片文章(国外的网站)帮我解决了问题,因此想与大家分享。

    首先错误信息(见图一):

                                           图一

    解决方法:

    一、验证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://

    参考网址:

    http://www.jppinto.com/2009/01/automatically-redirect-http-requests-to-https-on-iis-6/

  • 相关阅读:
    字典与集合
    gitee
    在使用pycharm时同时缩进、左移、多行注释
    代码1(while循环和IF条件语句,字符格式化,break,continue)
    python基础-工具
    11 Serializer组件
    10 响应模块
    09 异常模块
    08 解析模块
    07 渲染模块
  • 原文地址:https://www.cnblogs.com/nanyaxu/p/2777507.html
Copyright © 2011-2022 走看看