Force SSL & Non SSL

Force SSL & Non SSL Using HTACCESS

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]

 


Free Facebook Page Likes