Redirect rule to page "freezes"

(as the forum doesn’t let me use links please assume D is 3dprintedawe, T1 co.uk and T2 plain uk)

Hi, I do have D.T1 hosted by pages, and D T2 /* and . D T2 / both using page rules to redirect to https:// D T1 /$1.

D T2 and www D T2 are proxied CNAMEs of D T1

if I try to grab favicon-32x32.png via D T2 the redirect works, but if I try www D T2 it just waits… and waits… and waits, and no response ever happens.

any idea what’s going on?

It should work to put them as preformatted text, usually with a ` at each end. Then your post should make more sense.

let’s try again. thanks @sdayman for the pro tip!

I have 3dprintedawe.co.uk hosted by pages.dev and 3dprintedawe.uk/* and *.3dprintedawe.uk/* redirected to https://3dprintedawe.co.uk/$1 using page rules.

For some reason, https://3dprintedawe.uk/favicon-32x32.png gets the 301 just fine, but when using matching the second rule, https://www.3dprintedawe.uk/favicon-32x32.png it times out (522)

3dprintedawe.uk and www.3dprintedawe.uk are both defined as proxied CNAMEs of 3dprintedawe.co.uk which is CNAMEd to 3dprintedawe.pages.dev.

both domains using Cloudflare DNS obviously. any idea what’s going on?

Thanks in advance

https://www.3dprintedawe.uk/ also times out. I don’t think your non-co page rule is working.

I also don’t think that your non-co CNAMEs that point to your .co CNAME that points to your pages.dev site will work. Most likely, you haven’t set the non-co hostnames as a custom hostname for the Pages site.

Remember that a CNAME is really like an “A” record (it’s just saving you the time of inputting an IP address). Ultimately, you’re connecting to the endpoint (pages.dev in this case), and that endpoint needs to be configured to respond to requests for the hostname in the browser’s URL.

Hi @sdayman. I assumed the page rules would take priority.
After you responded yesterday I changed the CNAMEs of 3dprintedawe.uk to point to 3dprintedawe.pages.dev and added it to the custom domains, but for some odd reason, it’s still in verifying.

(I wish I could edit the post, but I can’t)

these are the rules, pretty mundane

*.3dprintedawe.uk/$1
Forwarding URL (Status Code: 301 - Permanent Redirect, Url: https://3dprintedawe.co.uk/$1)

3dprintedawe.uk/*
Forwarding URL (Status Code: 301 - Permanent Redirect, Url: https://3dprintedawe.co.uk/$1)

That’s not valid syntax. You can use Wildcards for the match, and then $1, $2, etc. in the forward to correspond with each of the wildcards in the match. So it should be *.3dprintedawe.uk/* and the Forwarding URL would use $2 to carry over the second wildcard.

I feel stupid now!

*.3dprintedawe.uk/*
Forwarding URL (Status Code: 301 - Permanent Redirect, Url: https://3dprintedawe.co.uk/$2)

Thanks a lot! @sdayman

1 Like

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