繁体   English   中英

IIS 8中的HTTP到HTTPS重定向

[英]HTTP to HTTPS redirect in IIS 8

https://testitnow.in/edgar是基于ASP构建的网站。 我在IIS中配置了自动重定向,但是如果在Web浏览器中键入testitnow.in,我仍然收到以下错误-“ 403-禁止访问被拒绝。您无权使用凭据查看此目录或页面您提供的。”

但是,如果我输入https://testitnow.in或www.testitnow.in,它将重定向到https://testitnow.in 请帮助我解决此问题。

尝试更新您的web.config

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <clear />
                <rule name="Redirect to https" stopProcessing="true">
                    <match url=".*" />
                    <conditions>
                        <add input="{HTTPS}" pattern="off" ignoreCase="true" />
                    </conditions>
                    <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" appendQueryString="false" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM