Regex Redirection Rule

#488216
  • Resolved Muhammad Mustafa
    Rank Math free

    Hi, I want to add a regex redirection to change my current url structure domain/postname and move it to domain/category/postname

Viewing 3 replies - 1 through 3 (of 3 total)
  • Md. Sakib Khandaker
    Rank Math agency

    Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention.

    As you want to redirect non-category URLs to the category ones, unfortunately, Regex would not be a viable option as WordPress allows creating URLs with the same slug in different post types, it is not possible to detect the category of a URL only with the slug in our redirection module. Regex could have been used if the redirection was the other way around.

    However, In the case of permalink modifications, the redirections are automatically handled by WordPress itself. Which means, once you change your permalink structure on your website, the redirection should be automatically created by WordPress itself.

    You can simply head over to your WordPress Dashboard > Settings > Permalinks, and create a custom structure like below:

    custom structure

    If the WordPress redirections are not working, unfortunately, you’ll have to manually redirect the URLs using our Redirection module.

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

    Thank you.

    Muhammad Mustafa
    Rank Math free

    Hi, the wordpress redirections are not working.

    and the rankmath auto redirections aren’t helping either.

    guess i will have to add the redirections manually.

    Thank you so much!

    Hello,

    Yes, in this case, you need to add the redirections manually as our redirections module can’t query categories at the moment.

    Please do not hesitate to let us know if you need our assistance with anything else.

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

The ticket ‘Regex Redirection Rule’ is closed to new replies.