Forum Discussion
nathe
Jun 21, 2012Cirrocumulus
smiley_dba,
As I've learned recently, in this type of case it's simpler (and a shorter irule) to use Not. So, if you're not in the whitelist redirect. This is because a similar post came up very recently (https://devcentral.f5.com/Community/GroupDetails/tabid/1082223/asg/50/aft/2163192/showtab/groupforums/Default.aspx).
Also, not sure what version you're running but know that matchlass was deprecated in v10 by class match. Two examples below.
v9.x
when HTTP_REQUEST {
if {not ([matchclass [IP::remote_addr] equals $::Whitelist_Sorry]) } {
HTTP::redirect "http://sorry.********.ca/"
}
}
v10.x
when HTTP_REQUEST {
if {not ([class match [IP::remote_addr] equals Whitelist_Sorry]) } {
HTTP::redirect "http://sorry.********.ca/"
}
}
Hope these work for you.
N