Redirect all non-HTTPS traffic to https using .htaccess
To redirect all non-HTTPS traffic to HTTPSÂ using .htaccess, add the following to your .htaccess file: RewriteEngine on RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}