Forum Discussion
HTTP 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 uri's such as
www.domain.com/SiteA www.domain.com/SiteB www.domain.com/SiteC
If a client goes to www.domain.com/SiteB, I want to select pool B, but when the request gets sent to the pool member, I want it to pull up the root directory "/".
The reason behind this is my company has several facilities with camera systems. I would like to use the F5 as a front end with a single URL and distiguish the site by the uri. However the camera systems themselves are not very intelligent can only start requests by going to their root directory. Is it possibly to do this uri manipulation with an iRule?
1 Reply
- Kevin_Stewart
Employee
Please 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
* 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