RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

AddHandler application/x-httpd-php5 .htm
ErrorDocument 404 /404.shtml

