htaccess – How do I add /blog/ as a prefix to permalink structure for posts, categories & tags



The URL structure I am hoping for is as follows:

  • All posts: /blog/ and /blog/page/2
  • Categories: /blog/%category%/ and /blog/%category%/page/2
  • Post: /blog/%category%/%postname%/
  • Tags: /blog/%tag%/ and /blog/%tag%/page/2

My problem is that I am unable to have both my permalink ‘custom structure’ and ‘category/tag base’ with the “blog” prefix, without having page or pagination 404 errors.

I am working on a dev site which has no plugins and a custom theme which is not ineterferring. I would like a plugin-free solution which is .htaccess or in functions.php… or no code.

Thanks in advance for your help.

LatestScoop 2 years 2022-05-30T08:39:59-05:00 0 Answers 0 views 0

Leave an answer