Thursday, April 29th, 2010

Handy htaccess snippet

If you need to redirect a whole site to https try adding these 3 lines to you .htaccess file:

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

Please leave a Comment

You must be logged in to post a comment.