Forum Discussion
Danielseyoum
Jan 28, 2008Altostratus
All the sites resolve to the same VIP. The link that I am looking for is between once the cookie has been identified and start processing the iRule corresponding to the site. Per your recommendation combining the rules I have the following:
when HTTP_REQUEST {
if {[HTTP::cookie Department] == "HR" }{
switch [string tolower [getfield [HTTP::uri] "/" 2]]
"benefits" { HTTP::redirect "http://hr.abc.com/portal/Benefits"}
"ethics" { HTTP::redirect "http://hr.abc.com/portal/Ethics"}
"portal" {pool pool_hr}
default {HTTP::redirect "http://hr.abc.com/portal}
}
elseif {[HTTP::cookie Department] == "IT" }{
switch [string tolower [getfield [HTTP::uri] "/" 2]]
"dc" { HTTP::redirect "http://it.abc.com/it/datacenter"}
"db" { HTTP::redirect "http://it.abc.com/it/database"}
"it" {pool pool_it}
default {HTTP::redirect "http://it.abc.com/it}
}
else {
you will be directed to the landing page to choose department
HTTP::redirect "http://www.abc.com"
}
}
Thanks for the follow up.....