appended url redirect to new pool
I am trying to help our web developers test individual servers in the pool, but still go through the LTM. My idea is to have them append the original url. First I will create a new pool with the same servers, then by disabling/enabling pool members in the existing and new pool we can isolate individual servers for testing. Next I need the irule, which I am pretty new to, so that is where I need help. I want to use an appeneded url for example website.com and add website.com/testserver. Then use the irule to redirect to a new pool with the test server, but then I believe I would need to strip the /testserver back out of the request. My biggest concern is not to disrupt the existing web traffic as this will be put in production. Does this seem to be the best approach, and if so I would really appreciate some help constructing my irule. Here is what I have so far. Figured I could comment out the logs after initial troubleshooting. Not sure where to start with stripping back to the original url. Also feel free to completely ignore what I have in my irule so far.
when HTTP_REQUEST { Test server redirect switch -glob [string tolower [HTTP::path]] { "^/testserver" { log local0. "Client hit [HTTP::host][HTTP::path] and was directed to test pool" pool website.com_server_test } default { log local0. "Client hit [HTTP::host][HTTP::path] without being filtered" pool website.com }
}
Thanks in advance, Bill