【发布时间】:2017-10-19 22:15:04
【问题描述】:
我将博客从 Weebly 迁移到 Wordpress,我们在 Facebook 中有链接到 Weebly 用于帖子的旧 URL 结构。这部分 /1/post/ 和 .html 在 Wordpress 中导致 404。
有没有办法使用 301 重定向来删除导致问题的 URL 部分。或者使用 Wordpress 中的 template redirect 钩子和正则表达式来解决这个问题?
Weebly
example.com/1/post/2016/09/some-post.html
WordPress
example.com/2016/09/some-post/
【问题讨论】:
标签: php regex wordpress url-redirection http-status-code-301