Forum Discussion
Danielseyoum
Jan 23, 2008Altostratus
Calling another iRule from with in an iRule
I am inspecting the header for cookie and would like to direct the request accordingly. If cookie is not there the landing page will issue the cookie according to the user's choice of department. By t...
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.....
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects