7

With the release of Chrome Version 44.0.2403.89 m, I've noticed that our site is now completely broken. All of the HTTP URLs are being redirected to HTTPS URLs, which is a problem because our site does not support HTTPS.

Please note, this is not happening in any other browser, and was working on the previous Chrome release.

I've tried to replace all of our stylesheet calls with relative links, and that has worked, but the images that are loaded in automatically or through absolute paths as well as the navigation is still broken. Please see below image for the error page that is thrown when navigating, after accepting the security warning and proceeding.

Error thrown when navigating to a page.

Anyone have any advice as far as updating perhaps the .htaccess file goes, or something in functions?

Thanks.

  • This is a bug in Chrome or in Woocommerce or in Apache, not in WordPress. Wait for an update. – fuxia Jul 23 '15 at 16:46
  • @toscho I was kind of hoping that'd be the case, after trawling through forums for an hour or so, thanks. – Harry Ray Jul 23 '15 at 18:28
  • Chrome changed to accommodate the WooCommerce bug. If you're worried about old WooCommerce sites and users not updating Chrome, SSL Insecure Content Fixer has incorporated a fix. – webaware Jul 26 '15 at 10:40
6

Solution 1: Enable mod_header on the server and added this rule to my appache2.conf file:

<IfModule mod_headers.c>
  RequestHeader unset HTTPS
</IfModule>

Solution 2: Or you need to add the code to fonction.php file of your current theme:

function https_chrome44fix() {
  $_SERVER['HTTPS'] = false;
}
add_action('init', 'https_chrome44fix',0); 
  • Much obliged, @Stepan! Your functions.php fix seems to have done the trick! – Harry Ray Jul 23 '15 at 18:32
  • Solution 1 is good for Apache. Solution 2 is bad for any sites that actually do support HTTPS. – webaware Jul 26 '15 at 10:49
5

This seems to be a bug that affects only Apache which is sending the user value for the header HTTPS as unprefixed header HTTPS instead of HTTP_HTTPS.

You should be able to fix that with a simple plugin:

if ( empty ( $_SERVER['SERVER_SOFTWARE'] ) )
    return;

if ( FALSE === stristr( $_SERVER['SERVER_SOFTWARE'], 'apache' ) )
    return;

if ( empty ( $_SERVER['HTTPS'] ) )
    return;

if ( '1' === $_SERVER['HTTPS'] )
    $_SERVER['HTTPS'] = FALSE;

if ( '1' === $_SERVER['HTTP_HTTPS'] )
    $_SERVER['HTTP_HTTPS'] = FALSE;
  • The second-last test will prevent some server configurations from correctly testing is_ssl(). It's unnecessary, since the Google Chrome header will only come through as HTTP_HTTPS. This Super User answer has more detail on the issue. Google Chrome no longer sends that header (on updated versions). – webaware Jul 26 '15 at 10:48
  • @webaware In that case you won't need the plugin, right? – fuxia Jul 26 '15 at 11:22
  • Someone wondering why their non-HTTPS pages are loading HTTPS resources might install your plugin and break their HTTPS pages :) – webaware Jul 26 '15 at 11:29
  • 2
    @webaware Good! Then they learn an important lesson: Never install code that you don't understand. – fuxia Jul 26 '15 at 11:32
2

WooCommerce has released an update fixing this problem (at least for me)

Fix - Fixed Google Chrome forcing to use SSL. This can cause some issues on websites behind load balancers or reverse proxies. Read more.

Detailed notes at their blog post or in GitHub.

Make sure to refresh your caching plugins after updating, if you are using one.

0

The problem is the last update of google chrome.

You can use this to resolve until the new release of chrome

See also this page for more info

-1

You need to add the code to fonction.php file of your current theme:

if (!is_ssl()) {
 $_SERVER['HTTPS'] = false;
}
  • -1 -- is_ssl() would be true if $_SERVER['HTTPS'] was either 'on' or '1'. – webaware Jul 26 '15 at 10:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.