PAge rule redirect is broken

i have two rule for the same site where i redirect some of the parts of the site to a subdomain; one rule is working and the other is not; but they are basically same in nature

Rule 1 (Not working)
Pattern: *www.domain.com/auth/{asterix2}
Forwarding URL (Status Code: 302 - Permanent Redirect, Url: https://inbox.domain.com/auth/$2)

Rule 2 (Working)
*www.domain.com/accounts/{asterix2}
Forwarding URL (Status Code: 302 - Permanent Redirect, Url: https://inbox.domain.com/accounts/$2)

I tried purging the cache and waited 24 hours , but still one rule working but not the other

What can this be?

The matching paths are not properly formatted. Post a screenshot instead and do mention the actual domain/URLs.

The patterns are fine its that this CMS is not displaying the wildcards after the slash


1 Like

redirection is never attempted

And the first page rule is not working?

Actually you seem to be missing the “2” in your second page rule. Furthermore, you most likely dont need the first asterisk at all, or do you specifically?

The redirect seems to work just fine.

image

It might be either a DNS issue or caching issue on your end. Have you tried puring the browser cache?

i do need it; but i tried removing it and only using $1 after / … still doesnt work

Why do you need it? Is “www” actually a domain and you have any hosts beneath it? If you are on HTTPS, do you have a dedicated certificate in that case?

Anyhow, the redirect appears to work.

hmm it doesnt work in incognito also doesnt work when i check on remote sites

Check it at sitemeer.com/#https://www.finbit.org/accounts/test. Except for one 403 (which is a bit weird but I attribute to the security layer) you get all 302s.

Same at

$ curl -I -H "User-agent: Mozilla/5.0 (Windows NT 6.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0" https://www.finbit.org/accounts/test
HTTP/2 302
date: Sun, 15 Dec 2019 00:18:24 GMT
cache-control: private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
expires: Thu, 01 Jan 1970 00:00:01 GMT
location: https://demo.domain.com/accounts/test
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
server: cloudflare

Did you make sure it is not a DNS issue and you actually go through Cloudflare?

Whats the output of these commands?

ping www.finbit.org
nslookup www.finbit.org

Hang on, your original description switched the page rules in comparison to your screenshot. So the issue is not “accounts” but “auth”?

If so I’d say this is because of the misconfigured redirect (aforementioned missing “2”).

yeah for another domain i just tested … only /accounts/ works but nothing new …

ive had created /accounts/ redirect long ago …
no new rules seem to have effect and when i change /accounts/ to /somethingelse/ its starts to just pass requests to origin instead of 302 redirecting

cf-cache-status: DYNAMIC
cf-ctrl: A , what is this ?

$2 is not the issue … i fixed that and tried to modify a working rule /accounts/ when i change it it stops working … when i revert to /accounts/ it starts working again

Well, if you want to pass on the match, it is the issue.

Anyhow, “auth” works too

$ curl -I -H "User-agent: Mozilla/5.0 (Windows NT 6.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0" https://www.finbit.org/auth/test
HTTP/2 302
date: Sun, 15 Dec 2019 00:38:43 GMT
cache-control: private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
expires: Thu, 01 Jan 1970 00:00:01 GMT
location: https://my.finbit.org/auth/test
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
server: cloudflare

Do page rules live on the edge locations ? is possible its stuck for my region ?

Possible yes, but unlikely. You still need to post the debug output I asked for before.

Also, what does this return?

curl -I -H "User-agent: Mozilla/5.0 (Windows NT 6.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0" https://www.finbit.org/auth/test

debug shows cloudflare ips and dns

nothing special; were page rules recently updated ?

No, page rules should be the same.