Does Single Redirect have an implied ELSE statement?

If we put 2 or 3 “if src.ip ne x.x.x.x, redirect to old site” separated by OR, shouldn’t the PCs of those listed be allowed to go the new site? It seems those rules catch everyone, even those with those specific public IPs.

If you have a simple expression like

(ip.src ne or (ip.src ne or (ip.src ne
You’re saying “if the ip is not equal to x, or if the Ip is not equal to y, or if …”. Your IP will not be not equal to more then one unique IP, so it’ll always be true.

You want to use “and”
(ip.src ne and ip.src ne and ip.src ne
If IP is not equal to 1, and not equal to 2, and not equal to …

Or better yet, not in list
(not ip.src in {})
If IP isn’t in the list… do x action

The Ruleset Engine is based on Wireshark Display Filters, docs here: Rule expressions · Cloudflare Ruleset Engine docs


Thank you! That worked and my bad, I was overthinking it!


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