Magento Admin Redirecting in Loop – How to Fix

admin-panelmagento-1.7redirect

Magento Admin url keep on redirecting and shows the below error.
This webpage has a redirect loop

Frontend is working fine, but the problem is with the magento admin url.

Also this problem occurs after implementing patch.

Best Answer

I found the cause for the issue. It is due to enabling of SSL.

Use the below code in .htaccess for Apache server.

<IfModule mod_ssl.c>
    SSLOptions StdEnvVars
    SetEnv HTTPS "on"
</IfModule>

Using nginx with php-fpm add these lines to nginx.conf:

fastcgi_param HTTPS on;