greenasp_41938
Jun 20, 2013Nimbostratus
bypass a splash page for certain IP addresses
I would like to change the iRule below to replace the "when HTTP_request" with the "when CLIENT_ACCEPTED" section of the irule. However, I get an error when i do. I am trying to allow certain IP address to bypass the splash rule.
Sets the highest priority even if other iRules are applied
priority 100
when CLIENT_ACCEPTED {
if {![IP::addr [IP::client_addr] equals 192.0.0.0/8]}{
pool splash_page_pool
event disable all
} else {
+
when HTTP_REQUEST {
if { [HTTP::uri] ends_with "logo.png" } {
HTTP::respond 200 content [b64decode [class element -value 0 image_class]] "Content-Type" "image/png"
} else { if { [HTTP::uri] ends_with "image1.jpg" } {
HTTP::respond 200 content [b64decode [class element -value 0 image_class ]] "Content-Type" "image/jpg"
} else {
HTTP::respond 200 content "
Etc.......