Forum Discussion
Srinivasan_G_31
Jun 06, 2012Nimbostratus
GEO 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...
hooleylist
Jun 06, 2012Cirrostratus
whereis 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
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