I have searched a lot but I couldn't find the answer of my specific problem.
Currently all users redirect to https://www.mydomain.com
if they type one of the following.
http://mydomain.com
(Replace http to https and add www here)http://www.mydomain.com
(Replace http to https here)https://mydomain.com
(Append www here)
I have this code in my .htaccess for above conditions.
RewriteCond %{HTTPS} !=on
RewriteRule ^.*$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
I can't figure out how do I stop redirection of any subdomain. e.g. users shouldn't be redirect to https
if type on of the following:
abc.mydomain.com
(subdomain can be any name)http://abc.mydomain.com
Any idea how to do this?
Thanks in advance for the help.