Forum Discussion
ryan_rockwell_1
Nimbostratus
Jan 06, 2014Need help combing or stacking iRules
I have 2 iRules that I either want to:
1. get working in a stacked configuration so it reads the first rule and if it's not relevant, act on the 2 rule.
2. combine the 2 rules so that the first secti...
nitass
Employee
Jan 06, 2014If I combine them the first section fails when activated and the connection fails. the second section will work if the condition of the first section is false.
how did you combine? is it something like this?
when HTTP_REQUEST {
set DEBUG 0
if {[active_members RHW-QA-RHW-HTTP] < 1} {
pool RHW-QA-RHW-HTTP-PH
return
}
if { $DEBUG } { log local0. "Request: [HTTP::uri]" }
switch -regex [string tolower [HTTP::uri]] {
"^/jobsearch.*" {
if { $DEBUG } {log local0. "Sending request to RHW-QA-RHW-HTTP-APP" }
pool RHW-QA-RHW-HTTP-APP
}
default {
pool RHW-QA-RHW-HTTP
}
}
}
by the way, is regex really needed? can it be glob instead?
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