Cloudflare Docs
Rules
Rules
Edit this page
Report an issue with this page
Log into the Cloudflare dashboard
Set theme to dark (⇧+D)

Rewrite path of 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.geoip.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.geoip.country == "PT"

Text after Path > Rewrite to… > Static:

/welcome-pt.html