How to Redirect HTTP to HTTPS for Apache

Tutorial to redirect all HTTP to HTTPS Site for Apache

After installing an SSL certificate, you’d need to redirect all website traffic to the HTTPS site to ensure that all visitors are secured in a private connection.

You’d need to access the .htacess file and add the following script:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}