Page Rule Wildcard Shenanigans


301 to

Going to works properly

Going to /one-two-three gets whacky

Not sure what it’s doing there… least-surprise would be
although if it’s greedy, three would be on its own. Is this WAI? Any clever way to only split on that first hyphen?



obviously. Preview would help on a new post. :slight_smile:

1 Like


Right. You’re only looking for one dash. So $2 will contain a dash and trigger the Page Rule again, which adds foo onto what you just redirected with two foos.

You may have to add multiple page rules, starting with a match for *-*-* if the most dashes you have is two. Then a second page rule for only one dash.

No guarantees this will work, but it should fix your current problem.

1 Like


Ahh, I think I misunderstood the “Only one Page Rule will trigger per URL” text - so it’s doing the initial rewrite, and then it’s a new URL, so it runs again.

OK, thanks! Might have to do this with a “real” rewriting engine on the backend.

(Feature request: “one and done” checkbox on a rule so it’ll stop after processing once. :-D)



To avoid further redirects, I’d suggest that a


page rule with some innocuous setting like IP Geolocation Header be placed before any

*-* page rules

1 Like


Oh, duh. Yeah, that’s interesting - so it is greedy. That gives

Definitely workable with that. Thanks!



I think One and Done generally works…except for a Forwarding URL which tells the browser to go to a different URL and try again. It’s very much like clicking a link on your website and you want Page Rules to execute again in that case.

1 Like