Fotios_30046
May 21, 2009Nimbostratus
Weirdness With iRule or Pool
We have a ticket system for development/qa running on its own VS. We then created a development copy of this system to test out changes before releasing them to production. I figured why setup another public IP and VS and leverage one VS, point both dns entries and use an iRule to determine which pool to use based on hostname.
Its been working without any major problems until today. I'm noticing the sites not coming up, but it seems the rule is ok because its logging to the /var/log/ltm correctly.
The iRule is:
when HTTP_REQUEST
{
log local0. "http host is: [HTTP::host]"
if { [HTTP::host] equals "support.furniture.com" }
{
log local0. "entered support.furniture.com"
if {
[HTTP::uri] equals "/"
} then {
HTTP::redirect "http://support.furniture.com/tmtrack/tmtrack.dll"
} else {
pool BusinessMashups-Production-Pool
}
}
elseif { [HTTP::host] equals "support.blueport.com" }
{
log local0. "entered support.blueport.com"
if {
[HTTP::uri] equals "/"
} then {
HTTP::redirect "http://support.blueport.com/tmtrack/tmtrack.dll"
} else {
pool BusinessMashups-Production-Pool
}
}
elseif { [HTTP::host] equals "devsupport.blueport.com" }
{
log local0. "entered devsupport.blueport.com"
log local0. "URI is: [HTTP::uri]"
if {
[HTTP::uri] equals "/"
} then {
HTTP::redirect "http://devsupport.blueport.com/tmtrack/tmtrack.dll"
} else {
pool BusinessMashups-Development-Pool
}
}
else {
log local0. "redirected to blueport commerce main site"
HTTP::redirect "http://www.blueport.com"
}
}