-
Hi! I’m experiencing an issue where RegEx redirections aren’t working. I had one written like this:
Source: /some-text-goes-here/
Destination: /{URL of my site}/When I visited the URL to redirect, I get a 404 “not found” page instead. So, I tested my source expression and found it was incorrect. Since I didn’t “escape” the forward slashes, the expression was “bad”. So, I added escapes to the forward slashes and my expression started working in online RegEx test sites, like regex101.com. However, the redirection still didn’t work.
So this is my question: where can I find documentation on the RegEx syntax the RankMath Redirection Manager expects for RegEx redirection expressions? I’ve seen other support tickets where the corrected RegEx syntax, for a given expression, was provided but there was no reference to a “syntax guide” of sorts. Are PCRE expressions expected vs JavaScript expressions?
I resolved my immediate issue by changing from “RegEx” to “Contains” and now the redirection works as expected.
Thanks in advance!
The ticket ‘Help needed with RegEx redirections not working’ is closed to new replies.