dean_02_164511
Aug 18, 2015Nimbostratus
Geolocation with more than one country
I created the below little snippet to check the country code and redirect. What is the easiest way to format the below if I wanted to see if it was from multiple countries like US, JP, CN, etc.
when HTTP_REQUEST {
if {[whereis [IP::client_addr]] contains "US"} {
HTTP::redirect "http://www.example1.com/"
} else {
HTTP::redirect "http://www.example2.com/"
}
}
thanks dean