How to Redirect All HTTP to HTTPS .htaccess
If you have installed an SSL certificate on your website, the website may not be available via a secure HTTPS connection by default.
In this case, you need to redirect your visitors to the secured (HTTPS) version of your site. There are some way to redirect HTTP to HTTPS but we share only one way about it.
You need to insert the following lines of code in the .htaccess file.
# BEGIN Redirect HTTP to HTTPS RewriteEngine On RewriteCond %{HTTPS} !on RewriteCond %{SERVER_PORT} !^443$ RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] # END Redirect HTTP to HTTPS