Forum Discussion
iRule to append URI and send to pool members
I have the current iRule set up and working fine:
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
"clinicalapps.intouchstaging.com" {
if { [HTTP::uri] equals "/osu" } {
HTTP::redirect "https://[HTTP::host]/webapp"
}
else {
pool OSU_kainos_pool
}
}
default {
discard
}
}
}
Moving forward, I will need to add more pool members for different URIs. This one sends the client to a specific pool if the URI is "/osu" and changes the URI to "/webapp"
Next, I want to add another one if the URI is "/tristar" and do the same thing, change the URI to "/webapp" and then send to a different pool member.
I can't figure out how to modify the iRule to do a different pool based on URI, it breaks it whenever I try. Any help you guys can lend would be greatly appreciated.
1 Reply
- Vijay_E
Cirrus
You need something like this if you want to modify URI and send it to the pool instead of redirecting:
if { [HTTP::uri] equals "/osu" } { HTTP::uri "/webapp" pool POOL_webapp }
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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