I have the following statement and it works perfectly to redirect all requests for "www" on :80 to force the browser to the same location on :443
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule ^/(.*)$ https://www.mydomain.com/$1 [R=301,L]
However, what I want to do is, regardless of what is between https:// and .mydomain.com - in this case the www, but it could be anything, like "www2", or "dev" etc - I want the URL simply converted to it's SSL equivalent.
I'm new to mod_rewrite so is what I'm looking to do even possible given that the subdomain could be any variable length of characters?
Thanks in advance for any help.