I am trying to: regex redirect in Yoast -Yoast tested and confirmed unwanted interaction with WPML
Link to a page where the issue can be seen: daosoma.com/de/ab
I expected to see: redirect to daosoma.com/de/transkulturelle-psychotherapie
Instead, I got: 404 not found
--
Discussion and confirmation with Yoast:
Begin forwarded message:
From: Yoast Support <support@yoast.com>
Subject: Re: regex redirects in Yoast – manual needed
Date: 12 June 2023 at 12:46:37 CEST
To: Marc Heusser <marc.heusser@daosoma.com>
Ramon replied
Jun 12, 12:46
Hi Marc,
Thanks for your continued patience.
We can imagine how frustrating it can be when the redirects you've entered in Yoast SEO Premium don't work. Let's investigate this issue further and get to the bottom of this issue.
First of all, we'd like to clarify that the forward slash / doesn't have to be escaped as it's not a special character. You can find the list of Regex special characters on this page. That said, we implemented the regex redirects you provided in your email from June 11 in our testing environment, tested them, and verified they worked as expected. Having a closer look at your website, we noticed you're running the WPML plugin. We then enabled WPML on our test site, and the regex redirects that included a language directory, i.e. /de/ stopped working.
Thank you for bringing this issue to our attention. We've confirmed the problem you reported and have created a bug report for our development team.
Workaround
At this time, there is no known workaround other than using simple redirects instead of regex redirects.
What's next?
Our product team will assess the severity of this problem in relation to other open bug reports and new features. Based on their assessment, the bug report will be given a priority level. Our developers work on the highest priority issues first. Unfortunately, this means we cannot give you an estimate of when they'll start working on your report.
If you have any further information that may affect the prioritization or help our development team solve this bug, please feel invited to reply to this email. As soon as our development team has a clear indication in which release this problem will be solved, we'll send you an email to inform you.
Additionally, we highly recommend reporting plugin conflicts to the developer of the conflicting plugin (WPML in this case) as they may have additional information vital to providing a resolution. Having both teams work on the issue is a benefit to you.
How would you rate my reply?
Satisfaction Rating Icons
Thanks and regards,
Ramon
--
Ramon Bauza
Technical support engineer at Yoast
Marc Heusser replied
Jun 12, 8:09
Hi
Having worked with Unix for a while since many years I am well acquainted with regexes in general but not the specific way yoast implements them. I have tested examples with regex101.com but they do not work. Probably because of a silly omission or small change.
Getting a real specification or man page would be most helpful, also the examples are on my webpage to test. The hosting provider is infomaniak.com one of the largest and technically capable ones in Europe so their stuff just works.
Please give me a better answer.
TIA and best regards
Marc
Victoria replied
Jun 11, 16:54
Hi Marc,
Thank you for getting back to us.
We are reviewing your reply and will get back to you as soon as possible.
Thank you for your patience!
Thanks and regards,
Victoria
--
Victoria McCarter
Support Engineer at Yoast
Want to further optimize your website? Improve your SEO skills with our online SEO training courses!
Have you seen our Help Center? This will probably have the answer you're looking for!
Marc Heusser replied
Jun 11, 9:07
Hi Toyin
an example is not a man page for Yoast redirect regexes. Where is the standard spec to be found?
I’d expect eg matching a / would need to be escaped as \/, but it is not necessary nor does it work it seems in Yoast regex redirects.
de/ab -> de/transkulturelle-psychotherapie does work, redirects hidden link to hidden link (literal match)
de\/ab -> … does not work, hidden link results in not found (escaped special character / as \/)
So entering your example
de/([a-z])x\1x\1 -> de/transkulturelle-psychotherapie on my webpage (daosoma.com) with Yoast Premium does not work, hidden link results in not foundde/a[a-z] -> … does not work, hidden link results in not found
de/a[a-z]+ -> … does not redirect, hidden link results in not found
de/a[a-z]* -> … does not redirect, hidden link and hidden link result in not found
de/a-b -> … works as intended, redirects daosoma.com/de/a-b to hidden link (literal match)
de/a-[a-z] -> … does not work, hidden link results in not found
The last six examples are currently active on the website
What could be wrong?
Please get me more information on how these regex work, if there needs to be a specification ot a delimiter character like / first, etc
I do not understand why escaping the / does not work, I do not understand why a range like [a-z] ie one character between a and z does not match.
Thank you in advance
Marc
Toyin replied
Jun 11, 8:16
Hi Marc,
Thanks for contacting the Yoast support team.
We are sorry to hear that you're not finding enough information about Yoast SEO Premium redirects manager regex support. We can imagine how this could be disappointing for you. Let's sort this out right away!
The redirects manager regex tab support the standard spec. This means you could capture groups and match strings. We even tested the backreference by following the example given here of ([a-c])x\1x\1 that should match axaxa, bxbxb and cxcxc and that worked as well. So, you should be able to use backreference in the regular expression based on your needs.
Unfortunately, since these are very powerful we are unable to create them for you or offer advice as we do not want to put you or us in a position where we suggest something and it breaks your site.
Let us know if there's anything else we can assist you with; we're happy to help.
Thanks and regards,
Toyin
--
Toyin Ogunseinde
Support Engineer at Yoast
Want to further optimize your website? Improve your SEO skills with our online SEO training courses!
Have you seen our Help Center? This will probably have the answer you're looking for!
Marc Heusser sent a message
Jun 10, 20:31
I need a manual page for the Yoast regex redirects – specifying all the grammar of the regex there and the way the regex are being applied as I cannot get some to work which test well with regex101.com – eg / I seem not to need to escape with \/, a matches but [a-z] does not, …
TIA
Marc
|