如何使用https【简洁版】

http->https

有很多文章讲的很详细,这里我只是做个记录方便使用过又忘记了的时候看看帮助想起来过程是怎样的。

http://www.sslshopper.com/iis7-redirect-http-to-https.html

1.安装URL Rewrite模块

  下载:http://www.iis.net/download/URLRewrite

  需要停掉两个服务,安装的时候注意看错误提示,windows process activation service和Web management service

2.添加证书

  IIS服务器->服务器证书

  http://www.sslshopper.com/article-installing-an-ssl-certificate-in-windows-server-2008-iis-7.0.html

  http://tech.sina.com.cn/s/2008-06-24/1120705949.shtml

3.添加网站

  选择https协议,端口(默认443),选择SSL证书(我们用的GoDaddy)

 

忘记了一步webconfig的修改:

<system.webServer>
        <rewrite>
            <rules>
                <rule name="HTTP TO HTTPS" stopProcessing="true">
                    <match url="(.*)" />
                    <conditions>
                        <add input="{HTTPS}" pattern="off" ignoreCase="true"/>
                    </conditions>
                    <action type="Redirect"  redirectType="Found" url="https://%7bhttp_host%7d/%7BR:1}" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>

转载于:https://www.cnblogs.com/lynn995/archive/2011/01/25/1944407.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值