Thank you for using our plugin. I’m not sure what patterns these URLs follow. In case they are always your domain name followed by a single letter fragment, this would be the correct regex: [a-z]/ Like this:
If this is not the correct RegEx—or you need it to be more specific—please let me know.
Hi @saimmughal, The redirects are most likely made by WordPress core through the redirect_canonical function. While this can theoretically be prevented through a filter by the same name, it’s most likely not something you want to do. If you have a list with URLs, you can share them with me via email alpipego@protonmail.com and I can check if I can detect a pattern.
Just an update I tried the [a-z]/ rule but it made all the post status 401 GONE due to irrelevant 301 redirects as I mentioned above.
This doesn’t make sense because either it’s a redirect or the URL resolves to something useful, but then our plugin shouldn’t intervene.
You can see there are some links with /account.php?randomtext
Can I use 410 magic for them too? I will setup the rule on the website after your response!
Unfortunately, no. A request like this never hits the WordPress’ templating system, and therefore we won’t do anything with it.
If you only have those 6 URLs, it might be easier to add them individually instead of using a RegEx.
Please let me know if this helps.
Kind regards, Alex
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘Need help how to Regex url like /c/…’ is closed to new replies.