Help with IRule
I am having issues with my iRule.
Running code BIG-IP 10.2.1 Build 297.0 Final
iRule
---------------------------
when HTTP_REQUEST {
if { not ([matchclass [IP::client_addr] equals $::SS_CMS_Nets]) and ([matchclass [string tolower [HTTP::uri]] contains $::SS_CMS_URLs]) } {
HTTP::redirect "http://siteroot.com"
}
}
DataGroups
--------------------------
SS_CMS_NETS
192.168.100.0/24
SS_CMS_URLS
/cms-admin
What I am trying to achieve is to only allow requests to http://siteroot.com/cms-admin/ to be served to clients coming from the 192.168.100.0/24 subnet. All other clients need to be redirected back to http://siteroot.com/
So far all that happens is all clients irrespective of IP address get directed back to http://siteroot.com
Can someone please help figure out what I am doing wrong here?