【发布时间】:2014-11-07 12:46:32
【问题描述】:
当我在 Google 中使用关键字查找我的网站时,我发现它们带有诸如 http://example.com/tag/post/ 之类的标签,我需要它们从 Google 重定向到 http://example.com/post/ 之类的帖子。我该怎么做?
【问题讨论】:
标签: wordpress redirect post tags
当我在 Google 中使用关键字查找我的网站时,我发现它们带有诸如 http://example.com/tag/post/ 之类的标签,我需要它们从 Google 重定向到 http://example.com/post/ 之类的帖子。我该怎么做?
【问题讨论】:
标签: wordpress redirect post tags
由于您说每个网址都添加了tag,因此您需要修改您的permalink structure 以指向/%postname%/,而不是现在的任何结构。
请查看Codex on using permalinks了解更多信息。
【讨论】:
http://example.com/tag/post/ 也很好,但是当我按下链接时谷歌重定向到http://example.com/tag/post/,问题是这个页面与原始帖子不同,因此我需要该链接才能重定向到http://example.com/post/。简单地说,当我按下链接时,只需从 URL 中删除 /tag/ 即可。我想我必须用 .htaccess 改变一些东西,但我不知道是什么 :( 我试图改变 WP 中的永久链接结构。
http://example.com/post/,而不是http://example.com/tag/post/,会发生什么?