Force to HTTPS via htaccess

Add this to .htaccess file or create .htaccess and past that code.

RewriteEngine On 
RewriteCond %{HTTPS} off 
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Leave a Reply

Your email address will not be published. Required fields are marked *