Forum Discussion
Deb_Allen_18
Oct 13, 2007Historic F5 Account
This iRule will redirect only clients in that IP class list who request URI's in that specific path. All other requests (those from other IP addresses or for other URI paths) will go to the default pool:
when HTTP_REQUEST {
if {([matchclass [IP::client_addr] equals $::test]) && \
([string tolower [HTTP::uri]] starts_with "/xxx")}{
HTTP::redirect "http://xxx.why.not.net[HTTP::uri]"
} else {
pool myPool
}
}
For this rule to work, you'll need to define a class called "test" of type Address that contains the IP addresses/subnets for which you want to redirect, and the pool myPool must also be defined.
HTH
/deb