Forum Discussion
asabado
Nov 03, 2021Altocumulus
Geolocation redirection for external published DNS
I received a request to set up a redirection in the bigip depending on where the traffic is coming from. Basically when a customer accesses finder.abc.com(sample) from Spain, it gets redirected to ht...
spalande
Nacreous
You can use something like below
when HTTP_REQUEST {
switch -glob [whereis [IP::client_addr]country] {
"ES"
{
HTTP::respond 301 Location "https://www.abc.com/es-es/home/servicepoints.html"
}
"CH"
{
HTTP::respond 301 Location "https://www.abc.com/se-se/home/servicepoints.html"
}
default {
HTTP::respond 301 Location "https://www.abc.com/home"
}
}
}
Please check below for selecting country code in iRule accordingly.
asabado
Nov 03, 2021Altocumulus
Thanks SanjayP. Pardon my ignorance but this will be implemented in GTM I assume? Or can it be done at LTM level? Do I need to define the countries anywhere first?
Get Outlook for Android<>>
- spalandeNov 03, 2021Nacreous
this will be in LTM. You just use countrycode in iRule as mentioned above.
e.g. ES - Spain, CH - Switzerland
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