Stop processing page rule if match, or exclude match?

I simply need the equivalent of “if not listen.mydomain.com” then do this OR “if listen.mydomain.com then stop processing”.

I have a lot of

<subdomain>.mydomain.com/*
Which I want to redirect to
listen.mydomain.com/<subdomain>

So I have the following page rules which work well

*.mydomain.com/*
listen.mydomain.com/$1

The problem is, I do NOT want listen.mydomain.com to keep redirecting to listen.mydomain.com/listen
I thought there was a rule called “if match, then stop processing page rules”

I have tried to think of all sorts of clever ways around it, like redirecting to a “spare” domain with http:// instead of https, and then processing page rules which match only http… gets confusing and everything ends up having multiple redirects.

I also tried redirecting listen.mydomain.com to listen.mydomain.com/ (with the slash on the end), the idea being that I would then only process pages with the end slash… but of course, it then thinks there would be a loop.

Of course, I COULD make a whole load of empty amazon website hosting buckets and put a redirect URL on them, too?
But that’s a lot of faffing about!

The only other way is to turn off the orange cloud for listen.mydomain.com so that rule won’t get process, but then I miss out on all the cloudflare goodness.

There HAS to be a clever way round this…?

(Before someone says “put redirects in your webserver”, that’s missing the point!)

I’d try to add a First page rule that matches your “NOT” URL and add some innocuous setting. Then Page Rules will stop executing when it matches that first page rule.

2 Likes

Thank you - I took a while to reply because I am SURE I tried that very early on.

For whatever reason, whether I had made a typo, or had accidentally turned the rule of it hadn’t worked.

OK, well, THANK YOU for putting me right! I just needed to add some random header, as you suggested!

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.