Redirect based on URI/RFC1918 to Pool
The request I have is that clients coming from RFC1918 IP's with Admin/admin in the URI will be sent to a server in another pool separate from the VS. If the client is NOT coming from an RFC1918 IP and tries the URI Admin or admin its redirect to the root of the web service. The only piece that isn't working is sending the traffic to the pool when client is on RFC1918 and is trying the URI. I do get a page to load but the page is on the pool member of the VS, not the one in the iRule. The data group for 'rfc1918' is created and accurate.
when HTTP_REQUEST {
set req_uri [HTTP::uri]
if { ([class match [IP::remote_addr] eq rfc1918]) } {
}
elseif {$req_uri contains "Admin" or
$req_uri contains "admin" or
pool xyz_pool
}
elseif { (![class match [IP::remote_addr] eq rfc1918]) } {
HTTP::redirect "http://abc.com"
}
}