Tuesday, April 10, 2012

Redirect http to https Apache secure connection – force HTTPS Connections



In httpd.conf Just insert these below lines under your site. 


RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} 

Make sure you don't forget to load rewrite_module in httpd.conf

LoadModule rewrite_module modules/mod_rewrite.so

And restart the apache's service.