## categories – Permalinks settings: Post category page keeps redirecting to a page

Question

• WP version: 5.7.1
• Web server: nginx
• Plugins: deactivated

I am trying to get to a certain permalink structure, that an SEO agency is advising me to use.
Looks quite simple, but I can’t get it to work.

I’d like my posts to have /blog/ in their permalink. And to not contain the category slug. So for example, for a post that has ‘mean-white-cat’ as slug.
And the category page permalink to contains /blog/ too.
So for example, for an ‘mean-white-cat’ post, that is in a ‘white-cats’ category:

Post url: https://www.mycatsdomain.com/blog/mean-white-cat/

Category page url: https://www.mycatsdomain.com/blog/white-cats/

This is what I set on the Permalink Settings page, to try to get these urls:

Custom structure: /blog/%category%/%postname%/

Category base: blog/.

But this is not working correctly

The category url always redirects me to a page that has the same slug as the category (white-cats):
https://www.mycatsdomain.com/blog/white-cats/ redirects (301) to https://www.mycatsdomain.com/white-cats/

These were my previous urls and settings:

They work fine, and there is no redirection 301 from the category page to the other page that share the same slug. But I need to get rid of the category name in the post slug.

Post url: https://www.mycatsdomain.com/blog/white-cats/mean-white-cat/

Category page url: https://www.mycatsdomain.com/blog/white-cats/

Custom structure: /blog/%category%/%postname%/

Category base: blog/.

I understand that having a page and a category to share the same slug could be an issue. But as you can read above, it worked with my previous permalinks settings.

Note that there is a page with the /blog/ page on my website. This page is set as the “Posts page” in the theme customization.

Even weirder, when I tried to change the slug of that category page, to avoid the conflict with the page that has the same slug, it didn’t work either. It works with the previous permalinks settings, but not with the new one I’m trying to set.
When I change that category slug, from “white-cats” to be “red-cats”, https://www.mycatsdomain.com/blog/red-cats/ gives me a 4040… And this time, there is no “rec-cats” page that exists on the site.

I’ve come accross similar questions on the web, but didn’t find a similar example, of someone having a /blog/category-name url for the categories, and /blog/post-name for the posts…

If anyone understands what could cause these issues, I’m eager to read from you ! Thx

0
1 year 2021-08-11T09:29:49-05:00 0 Answers 0 views 0