stolivar_88319
Mar 28, 2012Nimbostratus
Using iRule for host header and uri routing (problem)
I have a virtual Server(F5) set up on an IP. I have two websites that share this IP and IIS is configured to handled host header hosting. I also run some java tomcat apps on one of the domains hosted so I need to route that to a different pool as well. So here is my config and maybe you all can help me
Virtaul server: Listens on 10.120.1.30 for www.host1.com, www.host2.com
www.host1.com gets routed to host1 pool
www.host2.com get routed to another pool
www.host1.com/pubservices-war gets hosted to tomcat pool
This all works correctly, but for some reason, I think something is being stripped out when host1 gets directed to the tomcat pool.
when HTTP_REQUEST {
switch [HTTP::host] {
www.host2.com { pool host2 }
www.host1.com {
if { [HTTP::uri] starts_with "/itunesu" } {
pool www.host1-Tomcat
} elseif { [HTTP::uri] starts_with "/iTunesu" } {
pool www.host1-Tomcat
} elseif { [HTTP::uri] starts_with "/iTunesU" } {
pool www.host1-Tomcat
} elseif { [HTTP::uri] starts_with "/pubservices-war" } {
pool www.host1-Tomcat
} elseif { [HTTP::uri] starts_with "/ref_form" } {
pool www.host1-Tomcat
} elseif { [HTTP::uri] starts_with "/ccv" } {
pool www.host1-Tomcat
}}
}
}
I believe by default all traffic goes to the default pool host1 as configured by the virtual server unless configured differently in the iRule.
Any thoughts?