JeffRay_129268
Nov 22, 2015Nimbostratus
irule based redirection issue
Dear Members, I have a problem of language redirection loop. As per code mentioned below, Preferred Language is detected (i.e fr (french) in browser and redirected by ltm but this redirection goes into loop instead of request forwarded to server to retrieve the page by client. Seems every time ltm gets redirected URL from client it checks language and does same redirection which ends in continuous loop (snippet below of redirection from ltm). While for other preferred language when selected e.g en it works fine as it is a default in rule. It is really painful for me to get rid of this loop and have no idea why it is not working. I need your expertise to help me get rid of this nasty loop. Thanks.
Response HTTP/1.0 302 Found
Location https://www.mylocalnet.us/fr/pages/default.aspx
Server BigIP
when HTTP_REQUEST {
if { [string tolower [HTTP::path]] equals "/atd/atd.xml" } {
HTTP::respond 301 "Location" "https://atd.mylocalnet.us/atd/atd.xml"
} elseif { [HTTP::header "Accept-Language"] starts_with "fr" } {
HTTP::redirect "https://www.mylocalnet.us/fr/pages/default.aspx"
} elseif { [string tolower [HTTP::path]] equals "/" } {
HTTP::redirect "https://www.mylocalnet.us/en/pages/default.aspx"
}
}