Simply add the following code to a .htaccess file and all HTTP traffic will be redirected to HTTPS:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
Was this answer helpful? 1 Users Found This Useful (29 Votes)