Skip to content

Rewrite page path for visitors in specific countries

Create two rewrite URL rules (part of Transform Rules) to rewrite the path of the welcome page for visitors in specific countries.

To have a welcome page in two languages, create two rewrite URL rules with a static rewrite of the path component:

Rewrite URL rule #1

Text in Expression Editor:

http.request.uri.path == "/welcome.html" && ip.src.country == "GB"

Text after Path > Rewrite to... > Static:

/welcome-gb.html

Rewrite URL rule #2

Text in Expression Editor:

http.request.uri.path == "/welcome.html" && ip.src.country == "PT"

Text after Path > Rewrite to... > Static:

/welcome-pt.html