Regex for Redirections

#70795
  • Resolved Waldhirsch
    Rank Math free

    Hi there
    I want to do some redirects via rankmath and want every url with /shop/randomstuffhere/category/ to be redirected to /shop/category/
    Tried a lot if regex but can’t find a fitting one so that no matter what is written there for “randomstuff” here the URL is properly redirected.
    Here are some Examples of what i tried. And manymore 😀

    /shop/*/category/
    ^\/shop\/(.*?)\/category\
    ^/shop/.*/category/$

Viewing 2 replies - 1 through 2 (of 2 total)
  • shop/(.*)/category
    seems to solve it

    Hello,

    We are glad you were able to find the solution to this.

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

The ticket ‘Regex for Redirections’ is closed to new replies.