Forum Discussion
hooleylist
Sep 22, 2006Cirrostratus
Hi,
You can set a pool using a variable like so:
when HTTP_REQUEST {
set my_pool "http_pool"
pool $my_pool
}
So it would just be a matter of extracting the portion of the URI that contains the pool name using string functions following the TCL string reference (Click here).
One thing to determine first is what delineates the string containing the pool name from the rest of the URI. Would the URI always and only be /xx-testD or /xx-testDD where D is a digit? Or would it be the start of the URI, like /xx-testDD/some/path/to/object.html?
Try posting again here if you have questions on using string to get the pool name from the URI.
Edit: here's a post from citizen_elah showing an example for extracting the node address from the URI and directing the request to that node. You should be able to adapt that for getting the pool from the URI.Click here
Aaron