Joomla SSL(HTTPS) infinite(loop) redirect

[Solved] Joomla SSL(HTTPS) infinite(loop) redirect

Posted in Web-development

This article describes how to resolve the infinite redirection issue after enabling SSL in Joomla

If you're here, it's probably too late to talk about the preparation points before activating the SSL function in Joomla, but maybe you're the lucky one who was lucky enough to find this article and avoid the hour, day, week puzzle in search of a fix. I hope the article will help you.

There are several ways to solve the problem of infinite redirect in Joomla after enabling SSL. Often, one way or another, edits are made to the file .htaccess, config.php or database. Let's look at several solutions to this problem.

Decision 1. Adjustable HTTPS via .htaccess

Here is the first and, as it turned out, the least obvious way out is to add to the file .htaccess the following line:

SetEnvIf X-HTTPS 1 HTTPS

Why the least obvious? The whole Internet talks about the solutions described below. I do not know, maybe this information is somewhere on a poorly indexed site, or that page causes failures in 90% of cases, because it contains little information in itself, because of what does not appear in the first results of search results for queries of the type "joomla ssl https redirect loop".

Decision 2. Adjustable HTTPS via .htaccess

Another way is to add .htaccess ONE OF the PAIRS (not all in a row!) lines of the following code:

RewriteCond %{HTTPS} OFF
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

or

RewriteCond %{HTTPS} =on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [QSA,L]

or

RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Decision 3. Add HTTPS to config.php to the site address

In the file config.php set manually the value for $live_site variable.

public $live_site = 'https://your_site_name';

Decision 4. Clear Cookies

And Yes, no matter how banal it sounds, and no matter how banal it was, we take and cleans the site cookies, page cache, everything related to the "problem" site in the browser, clean everything.

Tags: Google Chrome

Add comment


Security code
Refresh