Forum Moderators: phranque
https://%{HTTP_HOST}
Don’t do this. Requests for http://example.com will then be sent to https://example.com while requests for http://www.example.com are sent to https://www.example.com and then half of those requests will have to be redirected all over again.
RewriteCond %{HTTP_HOST} ^mydomain.com$
RewriteCond %{SERVER_PORT} 80