Magento https redirect loop

When you’ve enabled HTTPS in your store of magento and it gives you this error “The page isn’t redirecting properly”….


You need to change some code of zend framework to stop this error.

So, first open this page path: /lib/Zend/Controller/Request/
File name : Http.php

Now check this function getScheme()

You need to update this condition

$this->getServer(‘HTTPS’) == ‘on’

You need to find out which server variable is store https is enabled or not.

For example, $_SERVER[‘HTTP_X_FORWARDED_PROTO’] == ‘https’

so my update code is,

public function getScheme()
return ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') ? self::SCHEME_HTTPS : self::SCHEME_HTTP;


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s