Forcing HTTPS with .htaccess

How to force web sites to use https at all times

To make a domain redirect and/or use https at all times edit your .htaccess file in your webhosting root directory for the domain or sub domain and add:

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

changing to your domain name and extension. Please note you can also add www. if thats how you want it to display.