How can I remove the category slug from url post and change htaccess?

#77133
  • Resolved Arturo Espinoza
    Rank Math free

    Good Morning,
    I have a site whose structure has /% category% /% postname% / in each post.
    I would like that when removing “/% category% /”, and being already indexed in Google, it automatically redirects to the site without “/% category% /”

    I very much appreciate your help.

Viewing 1 replies (of 1 total)
  • Alberto
    Rank Math business

    Hello,

    You could set up a Regex redirection in the redirections dashboard like this one:
    (.*)/your-category-slug/(.*)

    So it is redirected to:
    https://$1/$2

    Just remember to replace “your-category-slug” with the slug of the category you want to redirect.

    Looking forward to help you.

    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 1 replies (of 1 total)

The ticket ‘How can I remove the category slug from url post and change htaccess?’ is closed to new replies.