當前位置: 首頁 >> Url Rewrite
IIS rewrite 强制 http 導向https

IIS rewrite 强制 http 導向https

只需要在網站設置中,「配置文件」配置一下就行了

<?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>


2017-12-10    web 技術    2648    0   
IIS7.5 URL文件名有加號或空格顯示404錯誤的解決辦法

IIS7.5 URL文件名有加號或空格顯示404錯誤的解決辦法

在處理標籤的時候,若是含有空格或是加號(+),在URL Rewrite之下,會形成404錯誤。

2015-11-08    web 技術    4990    0