mbleiweiss_2986
Dec 08, 2016Nimbostratus
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.