Forum Discussion
F5Hopper_28651
Nimbostratus
Aug 15, 2016Geolocation irule for states
so I have read many irules on the dev site, creating mine.
when HTTP_REQUEST {
if { ([string tolower [HTTP::uri]] starts_with "/testingpage") } {
Parse the client IP from the CDN header
...
janholtz
Altostratus
Aug 16, 2016set state [string tolower [whereis $client_ip abbrev]]
switch $state {
"NJ" -
"ID"
Change to
set state [string tolower [whereis $client_ip abbrev]]
log local0. "Lowercase state is $state"
switch $state {
"nj" -
"id"
And then tail -f /var/log/ltm to see what the F5 is picking up as state (if anything)
BR
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
