Does Cloudflare workers redirect works with wild card(*, $1)


I have doubts regards to Cloudflare workers. Do Cloudflare workers redirect works with the wild card(*, $1)

Path —>*
Redirect to —>*

E.g: —>

You should be able to write a worker to redirect these requests, yes.

You’ll probably need to bring Regex into it to create the substitution URL, but it’s a fairly simple Regex.

It’s worth noting that if you do not want to go down the Workers route then you can achieve this quite easily using only Page Rules (3 provided on the Cloudflare Free plan).

1 Like

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