Forum Discussion
computerli
Altostratus
Aug 01, 2013Execute two If condition in one iRule -- sorry page
I am new to iRule and need help in creating a sorry page
Here is condition
I have two pool english and french. When the nodes in the English pool are offline then redirect to URL (example g...
Kevin_Stewart
Employee
Aug 01, 2013I think you need to perform the active_members conditional within the scope of the requested language. Something like this perhaps:
when HTTP_REQUEST {
switch [string tolower [HTTP::header Accept-Language]] {
"en" {
if { [active_members english] == 0 } {
HTTP::redirect "http://google.com"
} else {
pool english
}
}
"fr" {
if { [active_members french] == 0 } {
HTTP::redirect "http://yahoo.com"
} else {
pool french
}
}
default {
do something else...
}
}
}
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