Forum Discussion
Volodymyr_32240
Nimbostratus
Nov 15, 2018iRule which check uri or path contains
I need to do iRule which check uri or path and send traffic to different pools,
and when client try connect to
"testweb.com/api/app/1/workstation-params/100"
it wiil go to
"testweb.com/api/app/wor...
Joel_Breton
Nimbostratus
Nov 15, 2018Hi,
You can try a switch case
when HTTP_REQUEST {
set myuri [HTTP:uri]
switch -glob [string tolower $myuri]{
"/api/app/1/" {
HTTP:path "/api/app/"
pool pool1
}
"/api/app/" {
pool pool1
}
"/api_aaa" {
pool pool2
}
else {
pool pool2
}
}
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
