Hello,
We apologize for the issue you are facing with the regex redirection. It seems that the backslashes are being removed when you save the settings, which is crucial for your regex to function correctly.
In Rank Math, when using regex, you should ensure that you are escaping the backslashes properly. For example, if you need to use a backslash in your regex, you should double it (i.e., use instead of ).
Here’s how you can set up your regex redirect:
-
Source URL: Use the following regex pattern:
(.*?)([0-9]{4}/)([0-9]{2}/)(.*?)(sd*-ed*)(.html$)
This pattern captures the necessary groups while ensuring that backslashes are escaped.
-
Destination URL: Set your destination URL as:
https://rankmath.com/wp-content/uploads/2022/09/add-regex-2.jpg
This will redirect to the correct new URL using the captured group from your regex.
Make sure to test this regex on regex101 again to confirm it works as expected before applying it in Rank Math. If you continue to experience issues, please reply to this ticket, and a human agent from the Rank Math Support team will assist you further.
Thank you for raising this concern! We hope this helps you set up your redirection successfully.
Sources:
How to Use Regex Redirects in Rank Math » Rank Math
How to Set Up Redirections » Rank Math
I don’t want to remove backslashes as they are crucial for the expression to work properly.
Hello,
Thank you for contacting support.
You are trying to redirect from Blogger to WordPress and that cannot be handled by our plugin or WordPress. You will need to get in touch with Blogger support about the particular Regex system they use on their platform because that will influence the final expression to be used.
Don’t hesitate to get in touch if you have any other questions.
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.