IIS如何強(qiáng)制跳轉(zhuǎn)到https【轉(zhuǎn)自網(wǎng)絡(luò)】
IIS7需要先確認(rèn)是否安裝 “URL 重寫(xiě)” 或者 “URL Rewrite” 模塊 , 如果您已經(jīng)安裝可以跳過(guò)
“URL重寫(xiě)” 模塊下載地址
微軟下載地址(64位):http://www.microsoft.com/zh-cn/download/details.aspx?id=7435
微軟下載地址(32位):http://www.microsoft.com/zh-cn/download/details.aspx?id=5747
第一步: 選擇站點(diǎn), “URL 重寫(xiě)”,如果安裝的是英文版的 應(yīng)該是【Url Rewrite】

第二步: 添加 “ 空白規(guī)則”

第三步:添加規(guī)則
名稱 : HTTPS
匹配URL 模式: (.*)
添加條件:    條件: {HTTPS}  模式: off
操作類型選擇:重定向
重定向URL: https://{HTTP_HOST}/{R:1}


然后保存即可
高級(jí)版(直接把偽靜態(tài)添加到web.config)
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="HTTP to HTTPS redirect" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
                                下一篇
                
                    存在open SSH注入安全漏洞怎么辦?                    
                
                            
            
         
                             
                             
                                