I have test.yoursite.com parked on example.com and have a SSL multi-domain certificate.
What I am asking is:
- when
http://example.comrequested, .htaccess should redirect it tohttps://www.example.com; - when
http://test.yoursite.comrequested htaccess should redirect it tohttps://test.yoursite.com.
One of directions should work both with www and SSL redirection, another one is just for SSL redirection.
By the way I also have example.net parked on same host. I have tried several things which did not work. Waiting for your help.
Try
The first rule will redirect http://www.example.com/something to https://www.example.com/something as well as http://example.net/foo to https://www.example.net/foo
The second rule will redirect hosts that don’t care about the “www”, such as http://subdomain.domain.com/bar to https://subdomain.domain.com/bar
It will not, however, redirect http://sub-sub.subdomain.domain.com/.