site1.com 未启用 https 且未安装 SSL 证书。site2.com 确实启用了 https。当站点访问者请求https://site1.com时,他们会收到 SSL 证书不匹配错误,如果他们单击“继续”,则会将其发送到https://site2.com
由于 site1.com 没有 SSL 证书,我可以对任一主机做什么,将流量重定向回 site1.com,同时删除 https?
我在 site2.com 的 .htaccess 文件中试过这个
RewriteEngine on
#if the request is actually for site1 forward them to site1
RewriteRule "^site1.com" "http://site1.com" [R]
#if the request is actually for site1 (with www prefix) forward them to site 1
RewriteRule "^www.site1.com" "http://site1.com" [R]