We host a number of websites on our server. Our main site, let's call www.domain.com. Anyway, we noticed that the other sites we host, for instance, www.domain-a.com, www.domain-a.com, etc, all point back to our main site (www.domain.com) when https:// is put in front of their domain. Part of the problem is that these are indexing in Google as well. I need to make sure the https:// sites point to their respective sites rather than the main one. I'm wondering how I can do these redirections in the htaccess?? Please help!
No we do not. There isn't any graphical user interface. A small IT company runs the hosting environment for us, and they're not sure how to approach the issue.
Why is this even an issue? Whomever did the setup of the different domains did a crappy job - regardless of protocol, it should still redirect to the given domain, not fall back to a default domain.
Are you familiar with the typical cPanel/Apache setup? This happens all the time. It doesn't always "just work" like it is supposed to. ("Should" is a very relevant word!) Any suggestions instead of stating the obvious?
You should add dummy httpd virtualhost to you apache config like (this virtualhost should be above your another virtualhosts) <virtualhost *:443> server name default.domain documentroot /var/www/html </virtualhost> and then all reqests to https:// your.ip or https:// any.domain will show default page from /var/www/html And another https sites from apache config will shows correctly ____ www. secom. pro
You could simply add another RewriteCond to check if the host is metrikstudios.com RewriteCond %{HTTP_HOST} ^metrikstudios\.com [NC]