Forum Discussion
frisco76_104868
Nimbostratus
Oct 21, 2009redirect to another pool member based on URI string
hi all, i'm looking to implement the following iRule below. What I'm not sure of if I want to redirect to a member of ANOTHER pool. is that possible to do?
(iRule for Pool 1)
}
w...
Michael_Yates
Nimbostratus
Oct 24, 2011You do not need to list a default action unless you have one. The normal default action (unless you specify one) will allow all traffic that does not qualify for an iRule action to be passed through to the default pool applied to the Virtual Server.
Looking at your iRule, you do not need a default action.
You could also combine these separate iRules into a single iRule if you wanted to:
when HTTP_REQUEST {
if { [class match [IP::client_addr] eq grp-1] } {
ACCESS::disable
switch -glob [string tolower [HTTP::host]] {
"websiteurlhere.com" { pool grp-server2 }
}
}
}
when ACCESS_ACL_ALLOWED {
switch -glob [string tolower [HTTP::host]] {
"host_url_here" { pool grp-webserver1 }
}
}