How can I redirect HTTPS to HTTP in .htaccess for

2019-09-18 00:42发布

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, etc, all point back to our main site (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've wondering how I can redirect all these in the htaccess - please help!

1条回答
SAY GOODBYE
2楼-- · 2019-09-18 01:36

Add these rules to the htaccess file in your www.domain.com document root, preferably above any other routing rules that may be there:

RewriteEngine On
RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} ^(www\.)?domain\.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R]
查看更多
登录 后发表回答