Michael_Powell1
Oct 04, 2010Nimbostratus
Redirect dependent on source IP address and URI
Hi there
I have created the following iRule for a shared application server:
when HTTP_REQUEST {
if {[matchclass [IP::remote_addr] equals $::private_net] && [HTTP::uri] contains "/uri_string_a/"}{
return
}
else {
HTTP::redirect "http://www.example.com/"
}
}
The intention is to redirect any traffic to a specific uri and not from an internal network to the url www.example.com. However, the iRule is redirecting all traffic for all sites on the application server to the alternative url. Could anyone tell me what I have done wrong please?
Thanks in advance
Regards
Mike