Hello,
Thanks for contacting us.
You can set the redirection rule as below:
Source: ([0-9]{4})/([0-9]{2})/(.*)
Match: Regex
Destination: https://domain.com/$3
Hope this helps. Let us know if you need any other assistance.
It’s not working. I have set this rule and the last .html is still there which is causing the issue.
Infact, it is redirecting from URL like
From https://example.com/2022/04/sample-post.html to https://example.com/sample-post.html
Here only the year and month is removing. I want to remove the .html also.
Hello,
In this case, please try this code in the Source:
Source URL: /([0-9]{4})/([0-9]{2})/([^/.]+).html$
I hope that helps.
Thank you.
Hello,
I have updated the sensitive data as requested. Can you please check further?
Thank you.
Hello,
I tested the redirection on my own setup and it is working. You may have other redirections that are interfering with it. Please check the screencast in the sensitive data area.
There may be other redirections or .htaccess settings on your website interfering with the redirection. Please share your .htaccess file in the sensitive data so we can check. You can use a tool like wetransfer.com to share the file.
However, please note that more advanced redirections may require customizations that are beyond the scope of our support and you might need the help of a developer.
Hope that helps. Please let us know if you have questions.
In the source URL Source URL: /([0-9]{4})/([0-9]{2})/([^/.]+).html$ was given from you. And I checked the screen recording and remove the / from the beginning and it works.
Like this Source URL: ([0-9]{4})/([0-9]{2})/([^/.]+).html$
Thanks for your Valuable support. That’s why I love RankMath plugin over all SEO plugins as it provides a lot of features even in Free version. Thanks a lot. 👍👍
Hello,
I am glad that it is now sorted.
Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.
Thank you.