2013-05-16 60 views

回答

1

如果从一个域到另一个transfering你的WordPress网站,这是要走的路:

http://codex.wordpress.org/Moving_WordPress

几乎所有的时间提纲线做的伎俩:

//FIXME: do comment/remove these hack lines. (once the database is updated) 
update_option('siteurl', 'http://your.domain.name/the/path'); 
update_option('home', 'http://your.domain.name/the/path'); 

当然,你也需要改变自己的帖子和/或模板文件内的每个静态链接。

这里是一个链接,可以帮助内容替换链接:把这个代码上的header.php 传中

http://lorelle.wordpress.com/2005/12/01/search-and-replace-in-wordpress-mysql-database/

0

“get_the_ID(1)” 后(简单后)ID 。 设置重定向网址。

<?php if (get_the_ID(1)) { ?> 
    <script type="text/javascript"> 
     window.location = "http://www.google.com"; 
    </script> 
<?php } ?> 
+0

谢谢。它做到了。 如果我想将使用costum帖子类型的wordress域重定向到不使用costum帖子类型的新域名,该怎么办。我的意思是domain1.com/article/post-name到domain2.com/post-name? –

相关问题