Redirect a domain from HTTPs to HTTP

2019-09-17 11:26发布

I have on my server 3 different domains, on the main domain I have an SSL certificate, on the other 2 I have not.

So the main site is displaying

However the other two are displayed as and

as these domains have no SSL certificate it gives and error in IE/FIREFOX/CHROME however it seems fine in safari

I have tried to force the two domains to display http however un succesfull

This is in the .htaccess file:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

As i understand this redirects all the domains to https I tried the following

RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} domain1\.co\.uk$ [NC]
RewriteRule ^ https://www.examplemydomain.co.uk%{REQUEST_URI}  [R=301,L,NE]

However unsuccessful, any help is welcome.

0条回答
登录 后发表回答