Redirect rule issues with preserving path

Hello,

I am trying to move some page rules to redirect rules.
In page rule I can redirect wwwDOTdomainDOTcom/sale* to wwwDOTanotherdoaminDOTcom$1
above page rule is preserving URL path to wwwDOTanotherdomainDOTcom because i am using $1

due to above rule suppose if i am accessing wwwDOTdomainDOTcom/sale/product/router
it is redirecting to wwwDOTanotherdomainDOTcom/product/router

But when i am trying to create in page rule its not working.
$1 is not supported in redirect rule, also Preserve query string not working as expected.

I have configured redirect as below

Custom filter expression
Hostname equals to wwwDOTdomainDOTcom
AND URI path Starts with Sale

Then…

Type:Static URL:wwwDOTanotherdomainDOTcom Status code:301
Selected:preserver query string

Let me if you guys implemented similar requirement.

In the redirect rule set the type to ‘dynamic’ and use something like this in the value:
concat("https://www.domain2.com",http.request.uri.path)

Solved my issue

1 Like

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