Forum Discussion
Kevin_Stewart
Employee
Apr 23, 2013"[string tolower [HTTP::host]]:[TCP::local_port][string tolower [HTTP::uri]]" is going to evaluate the host, port, and URI, so your switch conditions will have to contain all three of those values.
ex. "example.mtd.today.com:8088/tuesday" { pool Stagin_Pool }
Also, if there's a chance that there's something after the "/tuesday" URI, then you should use switch -glob and make sure your switch conditionals end with a wildcard (star character).
ex. ex. "example.mtd.today.com:8088/tuesday*" { pool Stagin_Pool }
My other points were this:
1. If the host value IS ALWAYS THE SAME (ex. "example.mtd.today.com"), then there's probably no reason to include that in the evaluation.
2. If the port and URI are specific to a service (ex. port 8088 and URI "/tuesday"), then there's probably no reason to evaluate both. In other words, evaluate either the URI or the port.
Last, you can't capture the protocol specifier with these commands, so you should leave it out of the switch evaluation.