dongzhuo1733 2017-01-06 16:15
浏览 44
已采纳

如何阻止随机重定向到HTTPS?

I'm facing a very annoying issue for a long time, perhaps someone could shed a light on this matter...

All my Wordpress websites at shared enrivonment at Hostinger all have the same bug: Random redirects to HTTPS

Sometimes it tries to load all resources through HTTPS - seems randomly.

Most of the time though, the redirect occurs on wp-admin, while saving posts, navigating, etc.

I already added this to .htaccess, for example:

RewriteCond %{HTTPS} on 
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI}

These are default wordpress installations with no settings changed, it's really a bug, Hostinger already acknolwedged that. They said they would fix it, but it's been more than 6 months.

The certificate is issued to *.main-hosting.eu and the error is NET::ERR_CERT_AUTHORITY_INVALID

How can I redirect ALL HTTPS requests to HTTP? How can I solve this bug?

-- Edit --

I confirmed it's a server-side bug, creating a simple debug.php with the following code: http://pastebin.com/n8PekA6d - the result is this: http://pastebin.com/t70nkTyj

  • 写回答

1条回答 默认 最新

  • doushu0591 2017-01-07 16:21
    关注

    I watched your video. Although I would normally recommend enabling https, in this case you might be off better with:

    $_SERVER['REQUEST_SCHEME'] = 'http';
    $_SERVER['SERVER_PORT'] = 80; //thanks to Lucas Bustamante
    

    in your wp-config.php. Hope that helps :)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 乌班图ip地址配置及远程SSH
  • ¥15 怎么让点阵屏显示静态爱心,用keiluVision5写出让点阵屏显示静态爱心的代码,越快越好
  • ¥15 PSPICE制作一个加法器
  • ¥15 javaweb项目无法正常跳转
  • ¥15 VMBox虚拟机无法访问
  • ¥15 skd显示找不到头文件
  • ¥15 机器视觉中图片中长度与真实长度的关系
  • ¥15 fastreport table 怎么只让每页的最下面和最顶部有横线
  • ¥15 java 的protected权限 ,问题在注释里
  • ¥15 这个是哪里有问题啊?