Making Apache server use SSL only

Here is a forum post on how to make all incoming connections to your apache web server redirect to https, i.e. take encripted connections via ssl by using apache’s rewrite module.