I use Redirect, not Rewrite, to force https
Code:
Redirect permanent / https://mydomain.com/
in the VirtualHost port 80 definition. Of course, there must also be a VirtualHost for port 443 for the Redirect to work.
That said, I'm not sure your Rewrite syntax is correct, but I don't know for sure.
Here's a link to the
Apache documentation.
See the extensive discussion for RewriteRule...