Forum Discussion
Neil_66348
Nimbostratus
Aug 15, 2013HTTP Cookie Redirect based upon cookie value and URL
Hi Guys,
Have an internal APP with needs language support now...
Basically , redirect to a different URL based upon a language cookie set on the web server and the URL asked for .
The below is ba...
nathe
Cirrocumulus
Aug 15, 2013Try this Neil, no expert at iRules but enjoy giving them a go and happy to help if I can.
when HTTP_REQUEST {
if { [HTTP::cookie exists "LANG"] } {
switch [HTTP::host] {
"www.website.com" -
"website.com" {
switch [HTTP::cookie value "LANG"] {
EN { HTTP::redirect "www.website.com/page.apsx?lang=en" }
ES { HTTP::redirect "www.website.com/page.apsx?lang=ES" }
DE { HTTP::redirect "www.website.com/page.apsx?lang=DE" }
}
}
}
}
}
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
