Forum Discussion

souravkayal_287's avatar
souravkayal_287
Icon for Nimbostratus rankNimbostratus
Aug 07, 2017

Help with Rule

So i have this rule in place but the requests are just reaching only one server but not the second one.Can someone help me please?

 

when HTTP_REQUEST { if {[HTTP::uri] equals "/" || [HTTP::uri] equals ""} { HTTP::redirect "; } elseif {[string tolower [HTTP::uri]] starts_with "/asvcs/"} { persist none pool pool_xx_abcd } elseif {[HTTP::cookie exists BIGipServer~NGDC~pool_xx_abcd]} { scan [HTTP::cookie BIGipServer~NGDC~pool_xx_abcd] {%[^.].%d.%d} myIpE myPortE unused set myIpH [format %08x $myIpE] set myIpD1 [expr 0x[substr $myIpH 6 2]] set myIpD2 [expr 0x[substr $myIpH 4 2]] set myIpD3 [expr 0x[substr $myIpH 2 2]] set myIpD4 [expr 0x[substr $myIpH 0 2]] set myIpD "$myIpD1.$myIpD2.$myIpD3.$myIpD4" set myPortH [format %04x $myPortE] set myPortD [string trimleft [expr 0x[substr $myPortH 2 2][substr $myPortH 0 2]] 0] node $myIpD $myPortD } } when HTTP_RESPONSE { if {[HTTP::status] == "302" } { switch -glob [string tolower [HTTP::header "Location"]] { "; - default { HTTP::header replace "Location" [string map {http https} [HTTP::header "Location"]] log local0. "After the location header is [HTTP::header "Location"]" } } } }

 

1 Reply

  • Hello,

    Maybe it is not related to the irule.

    Could you print the config. of the pool in question using this command

    tmsh list ltm pool http_pool all-properties

    If the priority group activation is used then it is maybe due to this feature.

    Regards