Cloudflare page rule isn't taking

I’ve setup a rule:

Also confirming that proxying is on, but the response isn’t what i’m expecting - it’s still hitting upstream.

The only help I see on this is to ensure proxying is ON - and this is the case for me. Can someone point me to what I’m missing?

here’s the couple other screenshots

However - the response isn’t what’s expected. Here’s the curl output:

Is it an orange to orange problem?

I’d really like to cache this page and serve from CF. Our provider (elementor) also uses CF I beleive.

Yes. The IP you point to ( belongs to Cloudflare, so this very likely is a O2O problem.

Leave off the https:// from the top URL field so that it looks like this:

Also keep in mind that doing it like this will only match the exact URL, you’ll need to include a wildcard if you want to match any URL under /post-graduate

A very easy workaround would be: implement the redirect with your .htaccess.
This saves you a PageRule, but therefore is a little bit slower, than if it would be implemented at Cloudflares Edge.

Should look something like this:

<ifModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule   "^/post-graduate(.+)"  "$1"  [R=301,L]


<ifModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule   "^/post-graduate"  ""  [R=301,L]


<ifModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule   "^/post-graduate/"  ""  [R=301,L]

first try with code 302 and if everything works, then switch to 301.

Hang on, something about this isn’t sitting right for me

I noticed that is hosting an actual website, you’re not just using it for forwarding

But in the screenshot of your DNS page your A record is pointing to a Cloudflare IP, which is fine for forwarding-only but otherwise shouldn’t work

The website shouldn’t be accessible with that DNS record unless something odd is going on

Are you possibly using a Cloudflare partner/reseller for hosting?

If you scroll down on your DNS page, do you see the nameservers and, or a different pair of Cloudflare nameservers?

Can you post a more comprehensive screenshot of your DNS page?

use bulk redirect

thanks folks.

  1. We’re using an upstream service for our site - so no access to editing such rules. (host is elementor).
  2. The host is also using Cloudflare. So this won’t work- o2o.

So, this resolves it - page rules won’t work for us. I’ll have to setup something on our hosting service side.

Cloudflare team: Could’ve saved me a lot of hair pulling if CF had recognizes O2O, and provided me an error on the page rules side. It has all the information (our DNS, the A record, it’s own IP range) to present this error.

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