我必须阅读这里的每一个答案100次,但我仍然不能让这个工作(也许我的VPS),但我也困扰我的主人,他们也不能破解它。
旧网站https://www.olddomain.co.uk我要301到新网站http://newdomain.com。
我已经尝试了我能找到的每一个能想到的htaccess代码/规则,但仍然不好。
任何想法,这些都是我在下面工作的2,但似乎htaccess不识别SSL,因此运行规则重定向。
RewriteEngine on
# First rule - if this is an SSL connection, then redirect
# to http://enginecoreplugs.com then stop processing other rules
RewriteCond %{HTTPS} on
RewriteRule (.*) http://enginecoreplugs.com/$1 [R=301,L]
# Second rule - all other requests, redirect to http://enginecoreplugs.com.
RewriteRule (.*) http://enginecoreplugs.com/$1 [R=301,L]或
RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]如果有任何帮助,旧网站我想301 = https://www.enginecoreplugs.co.uk新网站= http://enginecoreplugs.com。
提前感谢!!
将要
发布于 2017-12-04 20:11:21
我把一切都弄对了。
这最终在转发https版本的主机上出现了一些愚蠢的问题。
https://stackoverflow.com/questions/47354015
复制相似问题