Having issues with blog category URLs

#98986
  • Resolved Reed
    Rank Math free

    Hey guys, so I’ve been using RankMath for a while now and it’s an excellent plugin.

    I have had a slight issue while using it though that I would appreciate some help with.

    Currently my blog category URL is:
    https://example.com/chakras/

    However, I would like this to be
    https://example.com/blog/chakras/

    So, in order to get the /blog/ to show in the category URL, what I have tried is putting “blog” into the category permalinks settings, and then disabling the RankMath option “Strip Category Base”.

    This actually works perfectly for the categories, but for whatever reason, when I do this, it makes all of my posts 404 even though the URL for my posts themselves have not actually changed at all. They are the exact same.

    How do I get my category URLs fixed while using RankMath?

    Another issue I have is that for some weird reason, while using RankMath, I have dual categories.

    So, for example:
    https://domain.com/chakra
    and
    https://domain.com/blog/chakra
    these both exist at the same time, regardless of settings, but yet only one appears in sitemap.
    Clearly one of these should be either redirecting or 404’ing automatically.

    Any suggestions? Thanks.

    If you’d like to see my website URL, simply let me know, thanks.

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

    Thank you for getting in touch with us.

    You can use a regex to redirect all URLs to your new permalink structure with /blog/ except for the URLs already start with /blog/.

    
    Source: ^/(?!blog)(.*)
    Destination: /blog/$1
    

    As for the URL that doesn’t seem to redirect, please share the specific URL in the sensitive section so we can look into this further.

    Looking forward to helping you. Thank you

    Reed
    Rank Math free

    The problem is, I don’t want to direct all URLS to /blog/

    It’s an e-commerce website, with a blog, maybe I forgot to mention that, but obviously I only want the blog categories to have /blog/

    I’ll provide the URLS in the sensitive data section so you can understand what I am talking about.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)

The ticket ‘Having issues with blog category URLs’ is closed to new replies.