Force SSL with Mod_rewrite

I have started to fall in love with Mod_rewrite. One of the many many things Mod_rewrite can do is to force a page to be HTTP / SSL just add the code below to your .htaccess file.

RewriteEngine on
RewriteCond %{HTTPS} !^on$ [NC]
RewriteRule . https://%{HTTP_HOST}%{REQUEST_URI} [L]



Yet another way to do the same: http://www.linuxinsight.com/two-ways-to-force-ssl-on-your-website.html

Comments
BlogCFC was created by Raymond Camden. This blog is running version 5.9.001. Contact Blog Owner