Forum Discussion

Dominique_Perar's avatar
Dominique_Perar
Icon for Nimbostratus rankNimbostratus
Sep 15, 2017

i-rule for HTTP header -Accept-Language- based on the URI

Due to a bug in a server, As a workaround I need to:

Based on the URI and the http-header Accept-Language Change the http-header Accept-Language

So the server receive a modifed Accept-language value.

I write an iRule: if { [HTTP::uri] starts_with "/MyDirectoryXXX" } then { if { [HTTP::header "Accept-Language"] starts_with "eu"} then {HTTP::header replace Accept-Language "es-CR"¶} }

Does its seems the correct approach ?
Thank you.