Forum Discussion
Thiyagu_163984
Nimbostratus
Jun 04, 2017Irule to match a URI and defined RH parameter has certain defined variable
Hello All,
I'm trying to write an IRULE match an URI and a certain defined variable RH parameter value. If the condition met then it should forward the traffic to webserver else it should drop the tr...
Stanislas_Piro2
Cumulonimbus
Jun 05, 2017If you want to check multiple URLs, you can use switch command instead of if / elseif / elseif / else...
when HTTP_REQUEST {
set variable XX
switch -glob -- [HTTP::uri] {
"/obs.php?abc*" -
"/obs.php?def*" -
"/obs.php?re*" {
if {[string tolower [URI::query [HTTP::uri] "RH"]] equals "xx"} {
pool POOLX
}
else {
HTTP::respond 403
}
}
default {pool POOLX }
}
}
the dash character at the end of each value is like a or between values.
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