Gabber
December 15, 2019, 12:00am
1
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?
sandro
December 15, 2019, 12:01am
2
The matching paths are not properly formatted. Post a screenshot instead and do mention the actual domain/URLs.
Gabber
December 15, 2019, 12:02am
3
The patterns are fine its that this CMS is not displaying the wildcards after the slash
Gabber
December 15, 2019, 12:12am
6
redirection is never attempted
sandro
December 15, 2019, 12:13am
7
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?
sandro
December 15, 2019, 12:15am
8
The redirect seems to work just fine.
It might be either a DNS issue or caching issue on your end. Have you tried puring the browser cache?
Gabber
December 15, 2019, 12:15am
9
i do need it; but i tried removing it and only using $1 after / … still doesnt work
sandro
December 15, 2019, 12:16am
10
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.
Gabber
December 15, 2019, 12:18am
11
hmm it doesnt work in incognito also doesnt work when i check on remote sites
sandro
December 15, 2019, 12:20am
12
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
sandro
December 15, 2019, 12:31am
13
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”).
Gabber
December 15, 2019, 12:37am
14
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 ?
Gabber
December 15, 2019, 12:38am
15
$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
sandro
December 15, 2019, 12:39am
16
Gabber:
$2 is not the issue
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
Gabber
December 15, 2019, 12:39am
17
Do page rules live on the edge locations ? is possible its stuck for my region ?
sandro
December 15, 2019, 12:40am
18
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
Gabber
December 15, 2019, 12:40am
19
debug shows cloudflare ips and dns
Gabber
December 15, 2019, 12:41am
20
nothing special; were page rules recently updated ?
sandro
December 15, 2019, 12:41am
21
No, page rules should be the same.