Snippet: Force SSL in Apache HTTPd
Force SSL on all pages
You can force all of your pages to use HTTPS.
To do this you will need to modify your .htaccess file. Add these lines to the beginning of the www/.htaccess file.
1 RewriteEngine On
2 RewriteCond %{HTTPS} off
3 RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
...where example.com is your domain name.\\