Single Redirect Rule / Maintain URI Path without Regex

Hello, I hope you’re all well! We’re attempting to use Single Redirect Rules to do the following:

  1. Check for a hostname,
  2. Check for a specific country, e.g. UK
  3. Add a locale to the URL

We’ve currently been able to get the following to work:


( eq "" and eq "GB" and http.request.uri.path eq "/" and not http.referer contains "en-")

Then: lower(concat("", "en-", ))

This will successfully add “en-gb” to the URL and redirect the user to htttp://

My two questions are:

  1. We’re using not http.referer contains "en-" to allow a user to switch locales via a UI toggle, i.e. if “en-” is a referrer, allow the user to switch to This works in Safari, but Chrome / Chromium based browsers don’t seem to pick up the referred correctly. Any ideas on potential alternatives?

  2. Whilst the above works for the root domain, we’ve not been able to find a way to maintain the URI path so that we can add a locale to all URLs, e.g., without resorting to using regex, which unfortunately is only available on Cloudflare Business and costs $200 a month (we’re on Pro…). Bulk redirects isn’t a suitable option as it would mean maintaining a list of all possible URLs

Thank you for your help!

Bumping this for visibility!

You can do this with an expression of concat("https://",,"/en",http.request.uri.path) this will redirect matching requests (from GB) to

I’ve got a similar example in my demo setup but using the ‘accept-language’ header as input:

The ‘not starts_with()’ bit is important otherwise you’ll end up with a redirect loop that errors out after 50 :slight_smile: