Query string keep being appended twice
I have a Page Rule set up for redirection when matched. For some reason, the query string keep being appended twice, but the second one is never parsed. E.g:
Match:
- URL:
https://sub2.domain.com/*/*/*
Then:
- Forwarding URL 301
- https://sub1.domain.com/platform/$1/$2/$3
Testing:
- https://sub2.domain.com/arc/3/free?p=31
- Expected: https://sub1.domain.com/platform/arc/3/free?p=31
- Actual: https://sub1.domain.com/platform/arc/3/free?p=31?$query_string
Does anyone have an idea as to why this could be occurring?2 Replies
Try redirect rule instead of page rule. It have wildcard option.
https://developers.cloudflare.com/rules/url-forwarding/single-redirects/settings/#wildcard-url-redirect
Cloudflare Docs
Available redirect rules settings | Cloudflare Rules docs
The following sections describe the settings of redirect rules to configure static and dynamic URL redirects.
That seems to do the trick wonderfully. Thank you!