Robert_Pagano_7
Nov 14, 2007Nimbostratus
pool selection based on path in URI (and subsequent URI path modification)
I am trying to route connections based on the portion of the URI after the hostname.
For example, connections to...
http://www.example.com/lms/path/to/resource
...should be routed to a "LMS" server pool...
while connections to...
http://www.example.com/content/path/to/resource
...should be routed to a "CONTENT" server pool.
Going by an example provided in the LTM Configuration Guide, it looks like the following will work...
----------
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/lms" } {
pool LMS_pool
} elseif { [HTTP::uri] starts_with "/content" } {
pool content_pool
}
}
----------
One wrinkle, however, that I am not sure if the above will handle, is that the URI sent to the real server should not have the "starts_with" piece.
In other words...
client requests "http://www.example.com/lms/path/to/resource"
|
|
V
load balancer (selects pool and sets URI path to... "/path/to/resource"
|
|
V
real server
Any help with this will be greatly appreciated.