简体   繁体   English

将HTTPS重定向到HTTP(无SSL证书)

[英]Redirect HTTPS to HTTP (Without SSL cert)

I was using a SSL Certificate for my website and ranked it highly in search engines. 我为我的网站使用了SSL证书,并在搜索引擎中将其高度评价。 Now the SSL has expired and I no longer want to use it, is there some way to redirect my users to HTTP instead of HTTPS? 现在SSL已过期,我不再想要使用它,是否可以通过某种方式将我的用户重定向到HTTP而不是HTTPS?
What I've tried so far is to make a personal certificate and then added a rule to transfer the users in web.config using this code 到目前为止,我已经尝试过制作个人证书,然后添加一条规则,使用此代码在web.config中转移用户

<rewrite>
    <rules>
        <rule name="Redirect to HTTP" stopProcessing="true">
            <match url="(.*)" />
            <conditions>
                <add input="{HTTPS}" pattern="^ON$" />
            </conditions>
            <action type="Redirect" url="http://{HTTP_HOST}/{R:1}" redirectType="Permanent" />
        </rule>
    </rules>
</rewrite>

This resulted in an error page saying my connection is not safe (Becuse of the bad SSL). 这导致出现错误页面,提示我的连接不安全(错误的SSL的原因)。

Without a certificate, no SSL/TLS connection can be made. 没有证书,将无法建立SSL / TLS连接。 Then how can you send a HTTP redirect response with no request over a connection? 那么,如何通过连接发送无请求的HTTP重定向响应? Thus, it is technically impossible to do so. 因此,从技术上讲是不可能的。

You can probably generate a self signed certificate temporarily, which means if the users accept this certificate, they can at least still visit your site, and be redirected by you to HTTP. 您可能可以临时生成一个自签名证书,这意味着如果用户接受此证书,则他们至少仍可以访问您的站点,并被您重定向到HTTP。 I am not sure if a self signed certificate works for Google search spider or any other search engine though. 我不确定自签名证书是否适用于Google搜索蜘蛛或任何其他搜索引擎。

If possible, switch to a service provider such as CloudFlare, who offers free HTTPS certificates. 如果可能,请切换到提供免费HTTPS证书的服务提供商,例如CloudFlare。 That can resolve your issue without you paying a CA. 这可以解决您的问题,而无需您支付CA。

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

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