【发布时间】:2017-02-24 12:38:14
【问题描述】:
我已将目录重定向到.htaccess 中的 410
Redirect 410 /books/videos/
现在我想编写一个规则,将一些文章从 /books/videos/ 重定向到 301 页面。我试了如下
RewriteRule ^(.*)/books/videos/how-to-find-videos.html /books/how-to-find-videos.html [L,R=301]
当我访问 www.mysite.com/books/videos/how-to-find-videos.html 时,它会显示 410 已消失的页面。这意味着这里没有应用 301 规则。我怎样才能为同一目录获得410 and 301。
提前致谢。
【问题讨论】:
标签: php apache .htaccess redirect mod-rewrite