How to redirect from HTTP to HTTPS in Joomla site?


Joomla is a free and open-source content management system for publishing web content. With the help of Joomla, you can easily connect your website to a MySQLi, MySQL and also for PostgreSQL database, where it helps you to make your content management easy and allows it to develop powerful web applications and websites.


But before redirect from HTTP to HTTPS you need to buy an SSL certificate for your website.


Follow the below steps to redirect from HTTP to HTTPS in Joomla site:


>>>> First you need to install SSL Certificate on your server


>>>> Next you need to enable Force HTTPS/SSL on your Joomla website


---->>> Open Joomla admin panel


---->>> Now go to Global Configuration


---->>> In here you will find an option Server, over there in Force HTTPS option you need to change it into “Entire Site”



---->>> Once done click on Save


>>>> Additional Information


---->>> Once after forcing the HTTPS/SSL it may not be automatically redirected to HTTPS. So, in that case, you need to add some tweaks to your Joomla files


---->>> In you root directory you need to open a configuration.php file. Open that file and replace the following line:


var $live_site ='';


With:


var $live_site = 'https://www.yourdomain.com';


---->>> And in there you will also find .htaccess file over there you need to add the below commands-


RewriteEngine On

RewriteCond %{HTTPS} OFF

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