How to redirect http requests to https in apache

 DocumentRoot /var/www/html
 ServerName samtz.dyndns.org
 ErrorLog logs/samtz-error_log
 CustomLog logs/samtz-access_log combined
 
  Options ExecCGI
  Options Indexes
  AllowOverride All
 

 RewriteEngine on
 RewriteCond %{SERVER_PORT} =80
 RewriteRule ^(.*) https://%{SERVER_NAME}%{REQUEST_URI}