Forum Discussion
Oct 17, 2015
Hi
Try these?
iRule 1
when HTTP_REQUEST {
if { [IP::addr [IP::client_addr]/24 equals 192.168.1.0/24] } {
HTTP::respond 301 Location "http://mysite1.com"
} else {
HTTP::respond 301 Location "http://mysite2.com"
}
}
iRule 2
when HTTP_REQUEST {
set lastoctet [lindex [split [IP::client_addr] .] 3]
if { [expr $lastoctet % 2] == 1 } {
HTTP::respond 301 Location "http://mysite1.com"
} else {
HTTP::respond 301 Location "http://mysite2.com"
}
}
/Patrik