Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以在wordpress中屏蔽指向新域的url? 例如: URL : abc.com/test 我想要 abc.com/test 的内容,但将url更改为xyz.com。 我曾尝试添加.htaccess代码,但没有奏效。
您可以 301 重定向 from abc.com/testtoxyz.com但 wordpress 部署应该在xyz.com
abc.com/test
xyz.com
RewriteEngineOn RewriteCond%{HTTP_HOST} ^abc.com/test RewriteRule ^(.*) http://newdomain.com/$1 [P]
将此添加到路径上的.htaccess文件中abc.com/test
.htaccess