Matt_Mueller_10
Oct 23, 2008Nimbostratus
Help - starts_with subdomain pool routing?
I'm trying to write an irule that will pool information based on the incoming subdomain\domain used. For example, domain1 will have many subdomains, can I route the traffic to a desired pool based off the incoming subdomain\domain specified? Note my requests are coming in over HTTPS. What I am trying to accomplish is someone coming in over https://subdomain1.newdomain.com/virtualdirectory/ be routed to the appropriate pool in the background, and holding the virtual directory they specified. Right now requests are just going to the pool "errorpage" See my example below
when HTTP_REQUEST {
Checks the URI and looks for subdomain1
if { [string tolower [HTTP::uri]] starts_with "subdomain1." }{
pool subdomain1
Check the URI and look for subdomain2
} elseif { [string tolower [HTTP::uri]] starts_with "subdomain2." }{
pool subdomain2
All non-matching URIs
} else {
pool errorpage
}
}