I think the following should work for you:
when HTTP_REQUEST {
set selectedPool [LB::server pool]
set lowerHost [string tolower [HTTP::host]]
set lowerPath [string tolower [HTTP::path]]
if {$lowerHost ends_with "auction.com"} {
set clientIP [getfield [IP::client_addr] "%" 1]
if {($lowerPath starts_with "/test/admin") && !(([IP::addr $clientIP equals 10.10.10.0/24]) || ([IP::addr $clientIP equals 20.20.20.0/24]))} {
reject
}
set selectedPool Auction-Pool
} elseif {$lowerHost ends_with "test.com"} {
set selectedPool test-Pool
}
pool $selectedPool
}
I have also published as a snippet here
Snippet: irule-customization-63561