HTTP TO HTTPS

來源:互聯網
上載者:User

標籤:http to https

準備工作:

  1. 下載URL重寫並安裝:http://www.microsoft.com/zh-cn/download/details.aspx?id=7435

  2. website綁定443和80;

  3. 在web.config檔案中添加<system.webServe>            <rewrite>            <rules>                <rule name="HTTP to HTTPS" stopProcessing="true">                    <match url="(.*)" />                    <conditions>                        <add input="{HTTPS}" pattern="off" />                    </conditions>                    <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Temporary" />                </rule>            </rules>        </rewrite></system.webServer>

4.設定URL重寫並應用

650) this.width=650;" src="http://s3.51cto.com/wyfs02/M01/70/7F/wKiom1W4m2-CkK8EAAHnh1Wj1f0230.jpg" style="float:none;" title="建立入站規則" alt="wKiom1W4m2-CkK8EAAHnh1Wj1f0230.jpg" />

650) this.width=650;" src="http://s3.51cto.com/wyfs02/M02/70/7C/wKioL1W4nV6j0JagAAIWE3KYQ-k834.jpg" style="float:none;" title="設定匹配URL;添加條件" alt="wKioL1W4nV6j0JagAAIWE3KYQ-k834.jpg" />

650) this.width=650;" src="http://s3.51cto.com/wyfs02/M02/70/7F/wKiom1W4m2-RbzNAAAEXdD5JC8U479.jpg" style="float:none;" title="設定作業,重新導向" alt="wKiom1W4m2-RbzNAAAEXdD5JC8U479.jpg" />

5.重啟IIS服務,測試。



註:工作需要,參考網上部落格,手寫此文檔,日後做學習使用。


本文出自 “Z記錄” 部落格,請務必保留此出處http://i991019.blog.51cto.com/4174025/1679727

HTTP TO HTTPS

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.