Page rule with GET


A have page
And a lot of request send like
That means page opens w/o cache using, but this page make a lot of sql queries, and i need to always use 30 min cache for users. So i think i just need to redirect users to page w/o hash parameter, so they will get cached page.
What should i use in page rules, to get that result?


Something like a Forwarding URL (302, temp redirect):* to (or https) would accomplish what you ask.

But you could also create a rule for the status.php where the cache level is set to ‘ignore query strings’ which may be a more correct way of accomplishing your desired end result. You could possibly even set this caching level as your domain-wide setting if it doesn’t impact any of you other site behaviour.


Try choosing “ignore query string” in the caching section of your administration console. However, by default Cloudflare only caches static assets. So you may need to use a page rule with cache everything depending on your needs.


@cscharff mentioned “ignore query string” - note this can only be applied to static file extensions right now, or all file extensions as part of Custom Cache Keys on our Enterprise plan.

With that in mind, I think @saul’s idea to redirect to the correct URL and then (optionally) enabling cache everything on the correct URL with a separate page rule is a good one. This will force all visitors to the primary URL and leverage caching too.