Forum Discussion
hooleylist
Dec 09, 2011Cirrostratus
Hi Dave,
Just a couple of small suggestions. Set the host to lower case as it should be matched case insensitively. Also, using an equals operator like == or eq would (eventually) do a string comparison. A bitwise comparison with IP::addr will be more efficient and support CIDR.
http://devcentral.f5.com/wiki/iRules.ip__addr.ashx
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] equals "xyz.com" && [IP::addr [IP::client_addr] equals xxx.xxx.xxx.xxx] }
rateclass rateshape1
}
}
Aaron