0

我有一个旧的 Joomla 网站,我想迁移到 WordPress。我们的 Joomla 网站上有很多旧新闻,就像这样……</p>

/home/news-and-offers/news/476-new-bridal-boutique-posh-frocks-has-opened.html
/home/news-and-offers/news/594-fabulous-new-offer-from-hall-hotel-and-spa-in-birmingham.html
/home/news-and-offers/news/596-win-your-dress-for-free-this-week-at-berketex-bride.html
/home/news-and-offers/news/602-ask-alice-get-your-big-day-questions-answered.html
/home/news-and-offers/news/637-get-down-to-the-west-countrys-largest-wedding-exhibitions.html

我想批量重定向到…</p>

/category/wedding-news/

我将如何编写一个正则表达式来实现这一点,因为我不想将所有这些文章添加到我的 htaccess 文件中。

在此先感谢,詹姆斯

4

1 回答 1

0

把这样的东西/.htaccess重定向/home/news-and-offers/category/wedding-news

RewriteEngine on
RewriteRule ^/home/news-and-offers/ /category/wedding-news/ [R=301]
于 2013-02-26T16:02:03.827 回答