Web Hosting Talk







View Full Version : http to https instant redirection using .htacess


PEAK-Bobby
05-04-2007, 03:02 AM
Anyone got an idea on how I would go about setting up the http to https redirection instantly, so say a visitor viewed our site lookwhosonline.com it would instantly redirect them to https://lookwhosonline.com a secure connection. Just like PayPal.com has theirs.

Please respond, and if I miscategorized moderator please move.

Thanks a Million
-Bobby

steven99
05-04-2007, 03:15 AM
This should do:rewriteengine on
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L] (Not fully tested)

PEAK-Bobby
05-04-2007, 03:19 AM
i'll try that thanks.