Enforce https via mod rewrite in apache

RewriteEngine On        RewriteCond %{SERVER_PORT}     !^443$
 * 1) enforce HTTPS-encryption

#for all files RewriteRule (.*) https://%{SERVER_NAME}%{REQUEST_URI}