Forum Discussion
Eric_27678
Nimbostratus
Oct 09, 2013HTTP Pool Selection based on URI
I am trying to create a irule where I select a pool based on the uri the client is pointing to. However when the request gets sent to the server, I don't want to uri to forward through. An example is...
Kevin_Stewart
Employee
Oct 09, 2013Please try this:
when HTTP_REQUEST {
switch [string tolower [HTTP::uri]] {
"/sitea" {
pool site_a_pool
HTTP::uri "/"
}
"/siteb" {
pool site_b_pool
HTTP::uri "/"
}
"/sitec" {
pool site_c_pool
HTTP::uri "/"
}
}
}
This example only accounts for a static (base) URI. Will the request URI ever go beyond this base URI (ex. /SiteA/foo) where you might need to simply replace "/SiteA" and just send "/foo"?
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