Forum Discussion
- The_BhattmanNimbostratusDid you create the CLASS object called eligibility?
- Sams_88783NimbostratusHello Battman,
- The_BhattmanNimbostratusI think there is an extra brace at the end of the code
when HTTP_REQUEST { if {[IP::addr[IP::client_addr] equals 10.1.1.1] } { if { [matchclass [string tolower [HTTP::uri]] contains $::eligibility] } { pool POOL_230_2 } else { pool POOL_230_1 } } elseif {[IP::add [IP::client_addr] eq 10.1.1.8] } { pool POOL_230_ALL } else { switch [HTTP::method] { "GET" { log local0. "GET method used" } "POST" { log local0. "POST method used"} default { log local0. "Unexpected method used" } } if { [matchclass [string tolower [HTTP::uri]] contains $::eligibility ]} { pool POOL_230_2 log local0. "Eligibility request made." } elseif { [matchclass [string tolower [HTTP::uri]] ends_with $::images ]} { pool POOL_230_ALL log local0. "Image request Made" } else { pool pool_230_1 log local0. "Generic Request Made" } } }
- Sams_88783NimbostratusHello Battman,
- The_BhattmanNimbostratusHi Sumod,
class eligibility { "/fauxpro" "/fauxpro/false/" }
- Sams_88783NimbostratusHi Battman,
- The_BhattmanNimbostratusDuh....I forgot about "contains one of operator" is for classes.
class eligibility { "somethingsomething" } class images { ".jpg" ".gif" } when HTTP_REQUEST { if {[IP::addr[IP::client_addr] equals 10.1.1.1] } { if { [matchclass [string tolower [HTTP::uri]] contains $::eligibility] } { pool POOL_230_2 } else { pool POOL_230_1 } } elseif {[IP::add [IP::client_addr] eq 10.1.1.8] } { pool POOL_230_ALL } else { switch [HTTP::method] { "GET" { log local0. "GET method used" } "POST" { log local0. "POST method used"} default { log local0. "Unexpected method used" } } if { [matchclass [string tolower [HTTP::uri]] contains $::eligibility ]} { pool POOL_230_2 log local0. "Eligibility request made." } elseif { [matchclass [string tolower [HTTP::uri]] ends_with $::images ]} { pool POOL_230_ALL log local0. "Image request Made" } else { pool pool_230_1 log local0. "Generic Request Made" } } } }
- Sams_88783NimbostratusI dont think so...because when i checked in Classes option i had found an entry "MemberEligibility" "String" some URL's mentioned over there.
- The_BhattmanNimbostratusHi Sumod,
when HTTP_REQUEST { if {[IP::addr[IP::client_addr] equals 10.1.1.1] } { if { [string tolower [HTTP::uri]] contains "memberelegibility" } { pool POOL_230_2 } else { pool POOL_230_1 } } else if {[IP::add [IP::client_addr] eq 10.1.1.8] } { pool POOL_230_ALL } else { switch [HTTP::method] { "GET" { log local0. "GET method used" } "POST" { log local0. "POST method used"} default { log local0. "Unexpected method used" } } switch [string tolower [HTTP::uri]] { "*membereligibility* { pool POOL_230_2 log local0. "Eligibility request made." } "*images" { pool POOL_230_ALL log local0. "Image request Made" } default { pool pool_230_1 log local0. "Generic Request Made" } } } }
- Sams_88783NimbostratusPlease help me with this also...i tired but its giving me error