IIS rewrite 强制 http 導向https
2017-12-10 分類:web 技術 閱讀次數:3242 評論(0)只需要在網站設置中,「配置文件」配置一下就行了
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="HTTP to HTTPS redirect" stopProcessing="true">
<match url="(.*)" ></match>
<conditions>
<add input="{HTTPS}" pattern="^OFF$" ></add>
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" ></action>
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
轉載請註明出處為「本文轉載於『油拉林』原地址: http://blog.hiastro.com.tw/webtechs/IIS-rewrite-https」





評論
發表評論