Support » Fixing WordPress » Customised category permalinks

  • I’ve got some highly customised permalinks on a site I’m working on for a client. The short story is that the permalinks are working incorrectly for category links. Post and page links work fine. Just the category links remain broken.

    Article permalinks are set at: /articles/%post_id%.htm
    Currently category permalinks spit out: /topics/%category slug%

    The issue is that I’ve used the category slug for the full description of the category as it’s been a major migration project just to get it this far.

    Is there any way to rewrite the permalinks as: /topics/%category id% ?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    In order to remove a category from the permalink of category, you need to first backup your .htaccess file. After that open it and add this code:

    RewriteRule ^category/(.+)$$1 [R=301,L]

    Now, If your categories page default URL is:

    Once you save above code in htaccess, it will be set at:

    That’s it!


    Shane G.


    That’s not really the rewriting rule I’m looking for. I need a category slug permalink that can handle ampersands and spaces and/or rewrite to the category number.

    Think I might revisit my migration procedure and just preg_replace/json_encode the category slugs as a workaround.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Customised category permalinks’ is closed to new replies.