iRule redirect to pool that meets this URI

Need some help here. The general jist is that when a packet comes in that says www.abc.com/search, go to this pool2, but otherwise, go to pool1. The reason I put the whole URI is because multiple websites live in this VS.

client----abc.com/search----->VS=192.192.192.92 ----------->Pool1---->Members

|

|------->Pool2----->Members

How would I present this in a iRule?

RGW

RGW

How about:

when HTTP_REQUEST {
  if { [HTTP::uri] starts_with "/search" } {
    pool pool2
  } else {
    pool pool1
  }
}

Rgds,

N