Forum Discussion
Kiran_Kumar
Nimbostratus
Aug 14, 2013irule to switch uri based of a class file
Hi there,
I am beginner in terms of coding irules. I seek your help in coding an irule. My scenario is I need to switch multiple uris. I kind of know how to do it usinga switch statement. But as part...
Moe_Jartin
Cirrus
Aug 14, 2013If you are looking to switch (or route) traffic to different pools based on the URI you can use and irule simliar to this:
when HTTP_REQUEST {
set uri [string tolower [HTTP::uri]]
switch -glob $uri {
/uri1* {
pool http_pool1
}
/uri2* {
pool http_pool2
}
/uri3* -
/uri4* -
/uri5* {
pool http_pool3
} default {
pool http_pool4
}
}
}
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