Redirect via workers based on ip address-space and as

I saw many topics who asked for country based redirects via workers.

I have a big firewall rule, with many ip-blocks and a few as numbers.

What I want to do now is to redirect those clients to a specific url, instead of just blocking them or show them a captcha.

I would be really really grateful if anybody could help me with this issue.

Kind regards

Make a URL rewrite rule on Cloudflare based on the ip source address that will add or rewrite at the end of the URL. Than create a page rule for forwarding that URL to the desired location you want. Example url rewrite adds some like client at the end of the URL than using /client forward it to your desired url using page rule

there’s second option tooo. That’s way more simpler. Use bulk redirect. Create a redirect rule with ip source address and than add your url to list and it works!!

Wow, thank you! I got it working via the transform rule, but thats not the ideal way for me, because I have to use the locale rewrite before the redirect to another domain.

The second way via bulk redirect is still a bit confusing for me. I have setup a redirect rule there, with a ip-address space. Now I have ID: $foo Content type: IP Address. But how do I setup the redirect now?

Sorry, I meant: I have setup one ip address list $foo. But how can I use this exactly for the redirect now?

I think you getting it wrong. You create a redirect rule in which you add the ip addresses with or then attach url list to it

1 Like

Ah, yes, I got it! :smiley:

1 Like