To set up HTTP to HTTPS redirect, you need to add the following code to your .htaccess file.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>
Was this answer helpful? 233 Users Found This Useful (255 Votes)