Moving category URLs with Redirects

#152044
  • Resolved Lukasz
    Rank Math free

    Hello.
    I recently moved category URLs from /category/category-name to /category-name. The problem was the users were requesting the old URLs and they were getting 404 errors. I used RankMath Redirects to move any request starting with /category to the default page as a temporary measure but it does not feel like a good solution. I know this could be achieved by creating a redirect for every category but it is hard to do when there are many of them.
    I would like the users to be redirected from /category/category-name to /category-name. Can that be achieved using RankMath Redirects? If not, that would be a great feature to add.

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

    Thank you for getting in touch with us.

    You can achieve the redirection you want by using Rank mat regex redirection as shown below:

    Source: /category/(.*)
     Destination: https://yourURL.com/$1

    img

    Ensure to set this as regex then test it and let us know.

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Lukasz
    Rank Math free

    Thank you! It worked like a charm.

    I was confused by this page. It said the target redirection was supposed to be a fully qualified URL so I did not even know it was allowed. Please, fix this information in the docs and provide some more examples of redirections with regex patterns for people to see. I appreciate your help.

    Anas
    Rank Math business

    Hello,

    We are super happy that your issue is resolved. If you have any other questions in the future, know that we are here to help you.

    Thank you for your feedback, we will try to add more details to our knowledgebase.

    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

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

The ticket ‘Moving category URLs with Redirects’ is closed to new replies.