Redirect site to SSL using apache and .htaccess

A quick way to redirect your site to ssl, from non ssl can be done in a .htaccess file on apache webservers with mod_rewrite. Open .htaccess in a text editor.

RewriteEngine On 
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$$1 [R,L]

replace with your domain. Using the rewrite rule ^(.*)$ anything included in the domain redirects to SSL. For example will redirect to