I was looking for this solution for a long time. One of the solutions I found is this. By default, WordPress category permalinks are displayed like that:



As you can see, the category in the url is pretty useless. Here’s how to remove it:

First backup your .htaccess file. Then, open it and append the following line:

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


Once saved, your categories pages will be displayed like this:


However method above did not work for my template. I kept getting 404 error. Eventually I had to do this.

Because I need such redirects for categories only, which I have around 20-30. I installed this plugin:


went to plugin settings and added one redirect record, marked it as RegEx:

Source: URL: ^\/(ajax|javascript|air|java|mobile|software|jquery|php)(?:\/)?$
Target URL: /category/$1
HTTP Code: 301


Worked great!



Dima Svirid

Software architect, JAVA, Spring, Hibernate, AngularJs, Backbone, MongoDB, Oracle. CTO and Co-Founder of Homeadnet.com

More Posts

Follow Me:

Tagged with: