Rule to serve content from a different website for visitors from Quebec?

In light of "French First" legislation in Quebec, we'd like to redirect visitors in that provice who are going to our main website over to a page on our .quebec site. Right now the only options I'm seeing in the rules are picking ip.geoip.country at the country level, not the state or province level. Is there any way to target rules to geolocated visitors coming from a specific province?
1 Reply
Chaika
Chaika3mo ago
There's more precise geolocation fields available (all Maxmind Data which CF uses), although not via the Expression Builder. For example, ip.src.subdivision_1_iso_code https://developers.cloudflare.com/ruleset-engine/rules-language/fields/standard-fields/#ipsrcsubdivision_1_iso_code Looks like it should be CA-QC for Quebec, https://en.wikipedia.org/wiki/ISO_3166-2:CA You can click "Edit Expression" and use something like ip.src.subdivision_1_iso_code eq "CA-QC" If helpful I made it display the result of that on https://debug.chaika.me/ under requestHeaders -> "custom-subdivision_1_iso_code"
Want results from more Discord servers?
Add your server