IIS webconfig http重定向https配置

                <rule name="redirect to HTTPS" stopProcessing="true">
                    <match url="(.*)" />
                    <conditions>
                        <add input="{HTTP_HOST}" pattern="localhost" negate="true" />
                        <add input="{HTTP_HOST}" pattern="127.0.0.1" negate="true" />
                        <add input="{HTTPS}" pattern="^OFF$" />
                    </conditions>
                    <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" />
                </rule>

 

posted @ 2023-03-30 10:12  榕树下的回忆  阅读(17)  评论(0编辑  收藏  举报