Forum Discussion
Srinivasan_G_31
Nimbostratus
Jun 06, 2012GEO Based redirect
Friends,
I need help on getting an iRule that performs redirect to a specific web page based on client browser's country of access/GEO information. If the user accesses the website from Asia...
hoolio
Cirrostratus
Jun 06, 2012whereis is supported in 10.1 or higher for LTM. Here's an example of rewriting the URI based on the country code:
when CLIENT_ACCEPTED {
Save the country code once per connection
set cc [whereis [IP::client_addr] country]
}
when HTTP_REQUEST {
Check if the cc is not empty
if {$cc ne ""}{
Insert the country code in the requested URI
HTTP::uri "/${cc}[HTTP::uri]"
}
}
Aaron
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