Why is my custom module giving a "page not found" message when using https?
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}


or take a look at this article