更新时间:2022-04-26 00:06:33
在你的 .htaccess
RewriteEngine On
RewriteBase /
# Redirect test.php to new
RewriteCond %{HTTP_HOST} ^www\.old\.com$ [NC]
RewriteRule ^(test)\.php$ http://www.new.com/$1.php [R=301,L]
# Redirect test* to old
RewriteCond %{HTTP_HOST} ^www\.new\.com$ [NC]
RewriteRule ^test(.+)\.php$ http://www.old.com/test$1.php [R=301,L]