Regex Redirection Not Working

#549975
  • Resolved Mr SKT
    Rank Math free

    Hello,

    To redirect URLs from the format /{year}/{month}/{slug}.html to /{slug}/, I am using the following regex pattern and replacement string:

    Regex pattern: \/(\d{4})\/(\d{2})\/(.+)\.html
    Replacement string: /$3/

    And It’s Not Working

    Here is an example of my URL: /2023/01/domain-kaise-kharide.html to /domain-kaise-kharide/

    I recently switched a blog to WordPress from blogger, is there any solution.

Viewing 1 replies (of 1 total)
  • Hello,

    Thanks for contacting us and sorry for the inconvenience caused.

    Please use the following rule to redirect the old permalinks to the new ones:

    Source: /([0-9]{4})/([0-9]{2})/(.*).html
    Match: Regex
    Destination: https://yourdomain.com/$3

    Hope that helps. Let us know if you need any other assistance.

    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 ‘Regex Redirection Not Working’ is closed to new replies.