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...
Matt_Dierick
Employee
Nov 22, 2015OK, something like that. If starting page is "/" check language and redirect to the right URI.
when HTTP_REQUEST {
if { [string tolower [HTTP::path]] equals "/" } {
if { ![HTTP::path] starts_with "/fr" && ([HTTP::header "Accept-Language"] starts_with "fr") } {
HTTP::redirect "https://www.mylocalnet.us/fr/pages/default.aspx"
}
else {
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