https to http forwarding....

Avatar
  • Answered
I have a bunch of sub-domains and a main domain that has a multi-domain SSL on a dedicated server. I have forwarded all the subdomains and the main domain to yet another domain. So site1.com forwards to MainSite.com and everything is lovely. However, if I type Https://www.site1.com, it doesn't redirect, it gives me a Index of / cgi-bin directory page. I have about 260 domains and I set up forwarding on all of them to go to main site, but how can I get HTTPS access to redirect as well?
Avatar
Scott
Hello bobbytheg, Thank you for your question. 301 redirects do not care if the typed domain protocol is https or http, however, it does need to know to do it for both www and non-www. The code below is designed to point to an http:// domain regardless of whether the original domain uses http or https. It also works for both www and non-www. You will want to ensure that this code is in place of the htaccess files(s) and is there for each of your addon-domains. RewriteCond %{HTTP_HOST} ^\domain1\.com$ [OR] RewriteCond %{HTTP_HOST} ^www\domain1\.com$ RewriteRule ^/?$ "http\:\/\/domain2\.com\/" [R=301,L] You can set this code via the cPanel. Click here to view our article on how to set a redirect. Kindest Regards, Scott M