Page rule not redirecting all traffic as expected
I'm trying to create a page rule that redirects all domain traffic to a subdomain on the same domain. This is for putting my site in maintenance mode. I have a worker that returns a static page announcing the site is down for maintenance.
I've tried setting the URL to domain.org/* and the forwarding url to https://maintenance.domain.org (where the worker is running), but the rule doesn't seem to do anything. The app is still showing normally, instead of redirecting to the worker as hoped. Any help would be greatly appreciated.
3 Replies
sadly, neither of those techniques seems to work. The redirect rule seems to be ignored entirely
Is there a way to see the logs of a request and troubleshoot the rules?
I think my problem may be this: "Page Rules require a proxied DNS record for your page rule to work. Page Rules won’t apply to hostnames that don’t exist in DNS or aren’t being directed to Cloudflare."
Understanding and configuring Cloudflare Page Rules (Page Rules Tut...
You can define a page rule to trigger one or more actions whenever a certain URL pattern is matched. Page Rules are available in Rules > Page Rules.
Yep, that was it. It's working, now that I set the DNS entries to proxy and updated my TLS settings to full (strict)