【问题标题】:Force redirect https to http after expire ssl [duplicate]ssl过期后强制将https重定向到http [重复]
【发布时间】:2018-05-12 17:28:00
【问题描述】:

我的SSL 证书和dedicated IP 昨晚过期了,我的网站将不再使用https 现在我决定以某种方式继续使用http 并将所有https 重定向到http ,我知道google 有很多解决方案,比如:

RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [NE,L,R] 

并尝试阅读所有这些主题:

How do you redirect HTTPS to HTTP?

Https to http redirect using htaccess

或类似的答案,但这些都不能解决我的问题,我仍然得到这个浏览器错误:

此网站无法提供安全连接

example.com 发送了无效响应。

ERR_SSL_PROTOCOL_ERROR

Server: Apache
CMS: Open Cart
Host: Shared

我在opencart 的设置中关闭了ssl 配置,在config.php 中我更改了:

define('HTTPS_SERVER', 'https://example.com/');

收件人:

define('HTTPS_SERVER', 'http://example.com/');

但还是同样的错误。我在谷歌有很多用户和索引页面,有什么解决方案可以解决这个问题吗?我需要解决这个 A.S.A.P.

我如何强制https重定向到http

【问题讨论】:

  • 为什么不更新证书?
  • 长话短说,我想尽快从共享主机迁移到 VPS,现在我想保持网站运行,直到我迁移 @nogad
  • 不知道为什么会有什么不同

标签: php apache .htaccess ssl https


【解决方案1】:

试试这个,

RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

解释:

RewriteCond %{HTTPS} on

检查 HTTPS 是否开启(使用 https 发出请求)

然后

RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

【讨论】:

  • 还是一样,This site can’t provide a secure connection
  • 我已经更新了我的答案,试试吧。
  • 还是一样.. 看起来这条规则根本没读过。
猜你喜欢
  • 2020-07-23
  • 2011-11-03
  • 2020-05-28
  • 2016-11-14
  • 1970-01-01
  • 2012-10-25
  • 2015-01-01
  • 2017-04-14
  • 2014-10-10
相关资源
最近更新 更多