如何使用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>

posted @ 2011-01-25 11:24  lynn995  阅读(1745)  评论(0编辑  收藏  举报