MDVZWP_60102
Sep 17, 2008Nimbostratus
redirect to a new url based on source IP
Hi
I am new to iRule. I am trying to redirect to a new url based on source IP. Say if source is 10.44.8.100 then pool xyz if not redirect to a external url www.abc.com
Have defined the datagroup with 10.44.8.100. I am trying following but am getting invalid code.
Can some help me with the iRule config
when CLIENT_ACCEPTED {
if { [matchclass [IP::client_addr] equals $::Internal_client_datagroup] }{
pool xyz
} else {
HTTP::redirect https://www.abc.com
}
}
Thanks