URL Redirect not working Using Page Rules

Hi All,

I am trying to use the page-rules to perform redirect from one subdomain to another

Page Rule ( Working ): just for the subdomain
abc.cloud.com/*
Forwarding URL (Status Code: 301 - Permanent Redirect, Url: https://abc.newcloud.com/$1)

However, I need to do this for multiple subdomains and all of them would follow the above redirect scenario
i.e abc.cloud.com/* , xyz.cloud.com/*, def.cloud.com/* etc they should get redirected to https://abc.newcloud.com , xyz.newcloud.com/ , def.newcloud.com etc

I tried the page rule for single subdomain and is working as expected
However looking to consolidate under one rule

Not working -
*.cloud.com/*
Forwarding URL (Status Code: 301 - Permanent Redirect, Url: https://$1.newcloud.com/$2)

The above rule is not working, not sure what I am missing, could you please advise, thanks

“not working” is not very descriptive. What is the response when you try?

Your syntax is correct, and it should work. I just successfully tested this:

1 Like

Thanks for the response!
I am seeing CORS issue which I don’t see it when we do it for the single domain

Do not see CORS issue here
Page Rule ( Working ): just for the subdomain
abc.cloud.com/*
Forwarding URL (Status Code: 301 - Permanent Redirect, Url: https://abc.newcloud.com/$1 )

__

Seeing CORS issue
Not working -
*.cloud.com/*
Forwarding URL (Status Code: 301 - Permanent Redirect, Url: https://$1.newcloud.com/$2)

That sounds very strange.

Can you provide an actual redirect you are trying handle?

2 Likes

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