How to forward http requests to https
There are several ways to do this if you have seperate web directories for http and https:
1) Use an index.html with a forward header
2) Use an index.html with a forward javascript
But, if you are using the *same* web directory, how can you do it?
Use an .htaccess file and mod_rewrite
Add this code to the htaccess file, and it will forward any http request (on port 80) to https:
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301]