我有两个域名,一个旧的和一个新的。在这两个网站上的结构是相同的,所以我需要的是转移任何域名后的新页面
http://testurl.com/absolutely/anything/here 至
http://testurl2.com/absolutely/anything/here 我试过了:
RewriteRule ^(.*) http://testurl2.com/$1但是什么都不起作用:/
主url之后的所有内容都需要发送到新域。
发布于 2014-06-13 18:37:48
尝试此.htaccess
RewriteEngine On
RewriteCond %{HTTP_HOST} ^testurl.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.testurl.com$
RewriteRule (.*)$ http://testurl2.com/$1 [R=301,L][R=301]标志用于按状态重定向URL如果与给定规则匹配,则301[L]标志用于中断与其他规则的规则匹配。https://stackoverflow.com/questions/24200950
复制相似问题