|
To everyone with 1&1;shared SSL troubles (may work on other hosts also).
The problem occurs because $_SERVER[’HTTPS’] is not set with shared SSL. To fix this you need to make the following edits.
I DO NOT GUARANTEE THIS WILL WORK. BACKUP YOUR WORK FIRST. I ACCEPT NO RESPONSIBILITY IF THINGS GO WRONG.
...But this hack worked for me
Edit 1
--------------------
Open app/code/core/Mage/Core/Model/config.php.
On line 254, change:
$secure = isset($_SERVER['HTTPS']) || $_SERVER['SERVER_PORT']=='443';
to:
$secure = isset($_SERVER['HTTP_X_FORWARDED_SERVER']) || $_SERVER['SERVER_PORT']=='443';
Edit 2
-----------------
Open app/code/core/Mage/Core/Model/Store.php:
On line 336 change:
if (!empty($_SERVER['HTTPS'])) {
to
if (!empty($_SERVER['HTTP_X_FORWARDED_SERVER'])) {
Edit 3
-----------------
Open lib/Zend/OpenId.php
On line 97 change:
if (isset($_SERVER['HTTP_X_FORWARDED_SERVER']) && $_SERVER['HTTPS'] == 'on') {
to
if (isset($_SERVER['HTTP_X_FORWARDED_SERVER']) && $_SERVER['HTTP_X_FORWARDED_SERVER'] == 'sslrelay.com') {
Edit 4
-----------------
Open lib/Zend/Controller/Action/Helper/Redirector.php.
On line 185 change:
$proto = (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS']) ? 'http' : 'https';
to
$proto = (empty($_SERVER['HTTPS']) || empty($_SERVER['HTTP_X_FORWARDED_HOST'])) ? 'http' : 'https';
Let me know if it works for you.
Ed
|