Hello!
I am using a host provider where I have a big public_html directory and via CPanel can add on domain names. Those domain names function precisely as if they were hosted onto separate web servers. The files of those add on domain names could be found under public_html/name of the folder of my add on domain name.
In the main public_html directory I have a domain name installed by default. This domain name is using SSL. To make the http go to https I used:
RewriteEngine On
RewriteCond %{SERVER_PORT} !=443
RewriteRule ^ https://www.domain-name.com%{REQUEST_URI} [NS,R,L]
This works just fine but for the other add on domain names it does not. Namely:
When I type: www.domain-name.com I am redirected to https://www.domain-name.com
When I type www.add-on-domain.com I am redirected to https://www.domain-name.com as well.
What would you recommend me to do in order to have the domain-name.com redirect to https://www.domain-name.com and the add-on-domain-name.com redirect to its main web site http://www.add-on-domain.com.
Any comments or suggestions, especially from Richard would be highly appreciated. Thanks a lot in advance!