Force SSL/https using .htaccess and mod_rewrite
For Apache, you can use mod_ssl to force SSL with the SSLRequireSSL Directive: This directive forbids access unless HTTP over SSL (i.e. HTTPS) is enabled for the current connection. This is very handy inside the SSL-enabled virtual host or directories for defending against configuration errors that expose stuff that should be protected. When this directive … Read more