我把WordPress从我服务器的根目录移到了自己的一个特殊文件夹中,现在Google正在将我的帖子和这个特殊的WordPress文件夹一起索引,从而产生了一些404错误问题。
例如,假设我的WordPress核心文件安装在https://www.example.com/wordpress/ 但是主页是https://www.example.com/.
此帖子链接https://www.example.com/hello-world/435/ 工作正常,已被谷歌索引。不幸的是,谷歌也在索引https://www.example.com/wordpresshttps://www.example.com/hello-world/435/ 从而在谷歌搜索控制台中产生404个错误。
所以我的问题是,有没有办法.htaccess 使链接像https://www.example.com/wordpresshttps://www.example.com/hello-world/435/ 要重定向到右侧链接https://www.example.com/hello-world/435/?