Regex Redirections not working

#31030
  • Resolved Angraj
    Rank Math free

    Hello There,

    We were using redirection plugin for redirection of URLs but now we have imported all redirections to rankmath.
    One of our redirection settings was to redirect all URLs having the following structure:

    http://www.siteurl.com/2019/03/post-url.html (Google Blogger’s default url structure)
    redirect to http://www.siteurl.com/post-url

    using the following Regex:

    Source URLs: ^/\d{4}/\d{2}/(.*?)\.html
    Destination URL: siteurl.com/$1/

    The above Regex Redirections was working very fine with Redirection plugin but now it is not working with RankMath redirection setting. Please check it and give us the solution to resolve the problem urgently.

    Regards,

    Angraj

Viewing 3 replies - 1 through 3 (of 3 total)
  • Todd
    Rank Math free

    Hi Angraj,

    Thanks for getting in touch with us.

    This is the correct regex for doing that and it is working perfectly fine:
    null

    Source: \d{4}/\d{2}/(.+)\.html(.*)
    Target: $1/$2

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

    Thank you so much.
    It working fine now.

    Hello,

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

    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/?rate=5#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.

    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 Redirections not working’ is closed to new replies.