I added ssl-certificate on my Joomla web-site. My actions:

  1. Add certificate data to hosting
  2. In configuration check SSL for entire site
  3. In configuration.php rewrite live_site as https://mysite.com

And it's all good, web-site work with https, but I need to redirect site from http to https when user enter. For this I add to .htaccess next rule

RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%1%{REQUEST_URI} [R=301,L]

And after this I have an redirect loop error.

I tried different variants of rewrite rules in htaccess, but nothing help. Need an advice please.

Joomla 3.7.4 PHP 5.6.30 Server - Linux, Apache 2.0

1 Answer 1


You don't need to do anything else after Forcing HTTPS on the Entire Site through Joomla's Global Configuration.

The .htaccess redirection is redundant, as Joomla will treat the whole site's redirection to HTTPS.

***Update your Joomla to the latest version.

  • Doesn't forcing HTTPS in the global config do the redirection in PHP instead?
    – Lodder
    Commented Sep 12, 2018 at 17:50
  • I never ever had to question this, how exactly Joomla does it - but apparently it does so @Lodder.
    – FFrewin
    Commented Sep 12, 2018 at 19:08
  • In which case it's far better to do it at server level (htaccess) as opposed to PHP. Same goes for things like caching which people tend to use an extension for. That said, your answer still isnt wrong though
    – Lodder
    Commented Sep 13, 2018 at 7:05
  • Ok, agreed, Although "Better" needs some definition here. Redirecting through .htaccess can be more efficient - performance wise - which this is better, many will say. Using Joomla's config can be simpler - which this can be better for some others ;). Anyway the question was why the OP got a redirection loop, while he had already set Joomla's SSL on, and after trying to redirect also in his .htaccess. It wasn't about which approach is better. The good thing with JSE is that anyone can provide his own answers if he wants to, so the field is open :) @Lodder
    – FFrewin
    Commented Sep 13, 2018 at 7:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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