Women in Technology

Hear us Roar



Article:
  Step by Step: Configuring SSL Under Apache
Subject:   Sending users to the secure site
Date:   2008-03-06 09:37:50
From:   wmorse
This article is very handy. I wish I had seen it when setting up SSL on my web-server.


Sometimes I want visitors to be able to access the URL and not have to specify "https" or port 443 and be automatically re-routed to the secure site. I use mod_rewrite in an .htaccess file toredirect the user:
=========
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{SERVER_PORT} !443
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L]
=========


Probably others do this more elegantly, or can suggest reasons not to do this, but it has worked for me (so far). What other SSL tips and tricks are out there?