I'm confused. You are asking whether you can assign the pool based on conditions, and your first example does just that. Then you say you are doing it in the second example, but that code doesn't use the pool command at all. And, in the second example you are saying you cannot do a URI check, but that's what you did in the first example...
From what I can tell, your first example should route to the pool server_group_a if any of the conditions are met. Maybe it's your mixing of "and" and "or"s. I would recommend redoing the first example to as follows:
when HTTP_REQUEST {
if [matchclass [IP::client_addr] equals $::DVW] } {
switch -glob [HTTP::uri] {
"/NGQMRepository_com*" -
"/NGQMRepository_res*" -
"/q4*" -
"/QMSCTWeb*" -
"/qmwise4*" -
"/repxcl4*" -
"/SCPCentral*" -
"/SCPIntermediarySrvce*" -
"/SCPRemote*" -
"/2004content*" -
"/Faculty_Virtual*" {
pool server_group_a
}
}
}
}
The "-" at the end of each switch case acts as an "or" between all the comparison values. So, this code should pass traffic to the pool server_group_a for all client IPs in the DVW class AND the URI begins with one of the values (because of the "*" in the glob expression for each test).
If I have it wrong, then if you present a detailed explanation of the possible inputs and the desired results we can try to help you out further.
-Joe