我的帖子URL结构为http://example.com/slug
,类别URL为http://example.com/category/category-name
。
当前,我的自定义结构为/%postname%/,类别库为空。
我想将类别URL更改为http://example.com/category-name
。我该怎么办?
我尝试使用htaccess,但收到404错误:
RewriteRule ^category/(.+)$ http://www.yourwebsite.com/$1 [R=301,L]