Forum Discussion
JeffRay_129268
Nimbostratus
Nov 22, 2015irule 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 in...
JeffRay_129268
Nimbostratus
Nov 22, 2015I have now changed and tried this and with english or french any language when selected, loop has stopped as you expected that is good but it terminates on first request i.e client is redirected to http(s)://(www).mylocalnet.us and no URI is added.
Browser Debug output:
http://mylocalnet.us/ HTTP GET 301
https://www.mylocalnet.us/ HTTPS (Aborted)
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::path] starts_with "/fr" && !([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"
}
}
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