Forum Discussion
ryan_rockwell_1
Nimbostratus
Apr 18, 2014active members check on multiple pools
I have an iRule that redirects traffic to another pool by uri. I want to be able to mark the site offline with a placeholder if the default pool is unavailable. I have a seperate pool for my placeh...
nitass
Employee
Apr 23, 2014oh yes, you are correct. sorry, i misthought.
would you mind trying this?
when HTTP_REQUEST {
if { [active_members INF-HC-HTTP] < 1 } {
if { $static::DEBUG } { log local0. "Primary pool offline" }
switch -glob [string tolower [HTTP::path]] {
"/" -
"*css" -
"*jpg" -
"*gif" -
"*png" {
do nothing
}
default {
HTTP::redirect "http://[HTTP::host]"
}
}
pool QA-PH
} elseif { [class match [string tolower [HTTP::uri]] starts_with QA-HC-URI] } {
pool INF-HC-HTTPDNN
} else {
pool INF-HC-HTTP
}
}
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