Base Path URL Redirect to Specific Pool

Hi there,

I’m new to this forum and looking for some help, looking to create irule that will allow base path URL to redirect traffic to a certain pool.

example

incoming url https://xxxx.test.com/tester redirect to pool 1

incoming url https://xxx.test.com/tester/tester122 redirect to pool 2

Thanks,

Phong

Something like below. Modify the pool name accordingly.

when HTTP_REQUEST {
    set baseuri [lindex [split [string tolower [HTTP::uri]] "/"] 1]
	if { [HTTP::uri] eq "/$baseuri" } {
	pool pool_1
	} else {
	pool pool_2
   }
 }