Forum Discussion
amr_magdy_25051
Nimbostratus
Apr 16, 2017Irule that select pool memeber based on client language in http header
I am trying to make an irule that forwards traffic to a specific pool or pool member based on client language used in http header
Kevin_Davies_40
Nacreous
Apr 18, 2017Suggest you try the following...
when HTTP_REQUEST {
switch -glob [HTTP::header "Accept-Language"] {
en* { pool pool_app_english }
jp* { pool pool_app_japanese }
de* { pool pool_app_german }
default { pool pool_app_english }
}
}
The accept language header defined in RFC7231 takes the form of 2 letter abbreviation of language followed by additional information. The above iRule allows you to pick pools for specific languages and even set a default. You can choose not have a default and it will use the pool attached to the virtual server instead.
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