【发布时间】:2014-11-25 00:31:15
【问题描述】:
我更改了文章的 URL,因此我需要能够将它们全部重定向,但这是我之前在 htaccess 中设置的方式:
RewriteRule ^industry/([a-zA-Z0-9-]+).([0-9]+)/$ index.php?tag=industry&slug=$1&id=$2
这会给我类似的东西:
site.com/industry/blah-blah.6842/
现在有了我的新网站,我的 URL 设置如下:
site.com/blah-blah/
那么如何在 htaccess 中进行 301 重定向?我无法单独完成所有文章,因为它们太多了。
我需要能够重定向这个:
^industry/([a-zA-Z0-9-]+).([0-9]+)/$ to this: ^/([a-zA-Z0-9-]+)/$
提前致谢。
【问题讨论】:
标签: .htaccess redirect http-status-code-301