iRule Help selecting pool and SNAT_pool for specific URI's
We have an existing virutal server that we are trying to redirect traffic to different pools based on the URI requested. The iRule I have set up is below. The problem is that whenever a request for /a/* is sent the appropriate SNAT_pool and server pool are selected. However whenever a request for /TrafficDirector/* is sent the appropriate SNAT_pool is selected but the server pool the request is sent to is the default server pool. See below for the iRule:
when HTTP_REQUEST {
switch -glob [ string tolower [HTTP::path]] {
"/a/*" -
"/TrafficDirector/*"
{
Select the corresponding pool and SNAT pool
pool pandora.dev.foo.net_Inside_ProxyServers
snatpool blockbrochure-dev.stackato-1.foo.com_SNATpool
return
}
default {
Select the default pool
pool dev.foo.com_pool
}
}
}
What am I missing here?
Couple questions/comments:
1. Are you sure the correct SNAT pool is selecting? It looks like you're doing a tolower on the string, but then defining a mixed-case switch statement. Are any errors showing up in /var/log/ltm? 2. ProxyPass might be overkill for this, but it does cover all of your needs here... (do a DevCentral search for ProxyPass)