Remove Category Slug: How To Do This With WordPress
If you are like me, you may be wondering why WordPress forces you to display
/category/ in your category archives url structure. This adds one depth level in your website structure that is not even used to display content.
The default WordPress structure displays category archives like this: http://dukeo.com/category/wordpress/. With a very simple Apache
.htaccess trick, your link structure will be like this: http://dukeo.com/wordpress/.
To do this, you should open the
.htaccess file from the root of your WordPress installation. For example, for Dukeo,
.htaccess is located in /public_html/.
.htaccess file, add the following line:
RewriteRule ^category/(.+)$ http://www.dukeo.com/$1 [R=301,L]
Don’t forget to replace www.dukeo.com with your own domain name.