Click here for a quick guide on finding and editing your .htaccess file


To force visitors to your website to go to the SSL (https) page, add this code to the top of your .htaccess file

 

RewriteEngine On

RewriteCond %{HTTPS} off

RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

 

To force visitors to your site to use the non-SSL page, use this code in the top of your .htaccess file:

 

RewriteEngine On

RewriteCond %{HTTPS} on

RewriteRule ^ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

 



Did you find this article useful?