Route for worker

Hello
I want to add a route with a specific pattern for a worker.
I want that this worker route for all url having the special character %.
for example www.mydomaine/aze%err.com or www.mydomaine/subdom/aze%err.com or www.mydomaine/subdom/%err.com
I try .mydomainname.com/%*
but it fails…
Any suggestion?
Thanks in advance

% will be encoded as %25, so you’ll need to specify that in your path and make sure it is also properly encoded when sending the request.

1 Like

Hello
Thanks. The problem is in reality with url with accent in my wordpress site.
For example https://www.mydomain.com/rénale/ which is so https://www.mydomain.com/rénale/
When i enable the cloudflare cdn, url with accent return error 404.
When i bypass cloudflare cdn, I don’t get the 404 error.
Does somebody have a solution to fix that? Or should i rewrite all my urls with accent?
best regards

Hello
I have some url with accent in my wordpress site.
For example https://www.mydomain.com/rénale/ which is so https://www.mydomain.com/rénale/
My website is hosted on siteground and it uses the worker sg_worker which is provided by siteground on the SGoptimized plugin.
When i enable the cloudflare cdn, url with accent return error 404.
When i bypass cloudflare cdn and url with accent are served from the original siteground server and don’t get the 404 error.
Does somebody have a solution to fix that? Or should i rewrite all my urls with accent?
best regards

That’s a whole different issue then and something you’ll most likely have to clarify with your host as their code is apparently breaking.

It might be best you remove Cloudflare from your host and sign up for a full account, as you wouldn’t have such issues then.

1 Like

thanks
But the host said that the issue is not in their server. They said probably in cloudflare. They said that you don’t accept the “%” character in url. Is it true?
I try also to uninstall all wordpress plugin and switch to the default wordpress theme but the 404 error continue to occur on url with accent.
So, i don’t know what to do…
Today i just add a page rules .mydomainname.com/%* but it is not a good solution…

also please notice that this 404 problem occurs last week and the website was working perfectly before last week.

It is not, that’s most likely an issue with their Worker code and only they can fix that.

As I mentioned I’d suggest to switch to a Full account instead.

Hello
Here is the answer from the host siteground
"I totally understand you, Rory, but it appears that this is related to the way their services work and if the bypass solution is not working well for you it would be best to double-check with their support for another more suitable way to resolve this one. There are no errors on the server level which indicate an issue with the server we can help you troubleshoot "
The bypass solution is to add a page rules in CF
.mydomain.com/%*
Cache Level: Bypass

Any suggestion?

That’s not a Worker though, but a page rule.

Also, the 404 will be coming straight from their server, so skipping the cache won’t fix that either.

What’s the URL?

If they believe there is an issue on Cloudflare’s side they will need to contact Cloudflare themselves - being a partner - and clarify whatever they believe the issue is in their code.

But again, the best course of action would be to choose the route I mentioned earlier.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.