dpzjl68484
2015-07-24 13:02 阅读 46
已采纳

Wordpress网站坏了添加https到网址

I've been notified that my Wordpress site is broken and the first thing I can tell is that it's broken cause it is automatically adding the https protocol to almost every link. So links, css, forms, everything is broken.

My site uses Woocommerce, but it wasn't configured to work with SSL, plus it was working fine.

I've tried these things, but none of them brought functionality back:

  • Look for malicious code on files.
  • Define and set SSL variables to false on wp-config.php
  • Define Site's URL on wp-config.php
  • Look at .htaccess
  • Look for URLS with https on DB

My server doesn't have ssl and I'm not planning on using it. How do I fix this?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

2条回答 默认 最新

  • 已采纳
    duanjiwei1283 duanjiwei1283 2015-07-24 13:36

    If you're using Google Chrome it might be an issue.

    Read that article I saw yesterday: https://ma.ttias.be/chrome-44-sending-https-header-by-mistake-breaking-web-applications-everywhere/

    点赞 评论 复制链接分享
  • douti0467 douti0467 2015-07-24 15:51

    This issue happened because the latest Chrome version (44.0.2403.89) sends HTTPS: 1 in request headers, which force the Wordpress site to use https.

    Follow up the bug report here, it seems Chrome Dev team is working on it and hope they can fix it in next stable release by next Tuesday.

    If you are using WooCommerce (most of the reports are from people who using it), you may want to consider one of these workarounds:

    • Update to latest WooCommerce version, according to this blog post, they already fixed it on 2.3.13
    • Open plugins\woocommerce\woocommerce.php and comment out these lines
    if ( ! isset( $_SERVER['HTTPS'] ) && ! empty( $_SERVER['HTTP_HTTPS'] ) ) { 
        $_SERVER['HTTPS'] = $_SERVER['HTTP_HTTPS']; 
    }
    
    点赞 评论 复制链接分享

相关推荐