Forum Discussion
Jean_42123
Mar 06, 2011Nimbostratus
i-rule for HTTP header based on the Accept-Language
Hi Guys, Is it possible to write an i-rule to check the HTTP headers based on the "Accept-Language" field. thanks in advance. Jean
Hectorm
Apr 17, 2017Nimbostratus
Irule sometime do not like to many redirects statements I will do something as follow when HTTP_REQUEST {
if {[HTTP::uri] equals "/" } then { if { [HTTP::header "Accept-Language"] contains "en"} then {set Language "english/index.en"} elseif { [HTTP::header "Accept-Language"] contains "ar"} then {set Language "arabic/index.ar"} elseif { [HTTP::header "Accept-Language"] contains "fr"} then {set Language "french/index.fr"} HTTP::redirect "$Language" }
}
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