HTTP to HTTPS Forwards Please

Posted on the June 27th, 2008 under Rants, Technology / Computing by Joshua Glemza

Why do some sites that require a secure connection not automatically forward you to the secure site? How hard is it to do? Not very! (with Apache at least)

#How about a simple .htaccess file in the webroot?
#Force SSL for example.hwarf.com
RewriteCond %{HTTP_HOST} example.hwarf.com
RewriteCond %{SERVER_PORT} !443
RewriteRule ^(.*) https://example.hwarf.com/ [R,L]

Hopefully some sites will pay attention to this. I’m not mentioning any URLs.

One Response to 'HTTP to HTTPS Forwards Please'

Subscribe to comments with RSS
  1. klawson said, on November 13th, 2008 at 9:42 pm

    I agree. It can even be done easy in Windows World. First install SSL Cert. If you want one for free like Linux go to (http://support.microsoft.com/kb/840671#11)
    then setup IIS to require SSL
    (http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/56bdf977-14f8-4867-9c51-34c346d48b04.mspx?mfr=true)

    Linux is so much easier. 3 lines of code!
    Cheers!

You must be logged in to post a comment.