There are many many Irule available in devcentral. But I will suggest you to use f5 policy to match URI n redirect traffic to pool...
Create a new policy with properties:
Policy requires http
Policy controls forwarding
For each policy rule, define:
condition : http-uri parh starts_with /bugid
action : forward pool pool_x
Create a default rule without conditon assigning the default pool..
Example iRule(use of data group)
when HTTP_REQUEST {
if { [class match [string tolower [HTTP::path]] starts_with "uri_DataGroup" }{
pool pool_x
}
else {
pool defaultPool
}
}