【发布时间】:2011-11-21 18:42:48
【问题描述】:
我正计划迁移当前托管在
的博客www.blog.com
到新域中的子目录,例如
newdomain.com/blog
到目前为止,我已经看到了一些关于如何做到这一点的提示,[尤其是来自 Yoast (Joost) 的提示很有帮助,但与我的情况 1 不同。
有什么建议吗?
Joost的文章主要步骤如下:
[1] 编辑 wp-config.php
define('WP_SITEURL', 'http://www.newdomain.com');
define('WP_HOME', 'http://www.newdomain.com');
[2] 使用搜索和替换插件替换旧网址
[3] 更新 .htaccess 到
Redirect 301 /blog/ http://www.newdomain.com/ // <== note this is NOT my situation
// I likely need the reverse
但是,这并不能满足我的特殊需求,其中可能需要对 .htaccess 和 wp-config.php 进行不同的更改。
有什么建议吗?
【问题讨论】:
标签: wordpress .htaccess migration