smiley_dba_1116
Jun 21, 2012Nimbostratus
Whitelist a iRule, otherwise redirect
Need some help creating an iRule. The idea is that I have a VS, and I will be associating a iRule to do a redirect, but I dont want to do a redirect if a the IP/Subnet is in the iRule data group. I think I have something close, but would like someones feedback.
when HTTP_REQUEST {
if { ([matchclass [IP::remote_addr] equals $::Whitelist_Sorry]) } {
pass
}
elseif { ([matchclass [IP::remote_addr] equals $::epp-test]) } {
HTTP::redirect http://sorry.********.ca/
}
}
This idea is, if you are in Whitelist_Sorry iRule data group, pass through, otherwise, redirect to a the sorry page. Thoughts?