Forum Discussion

Daniel_Vu_10371's avatar
Daniel_Vu_10371
Icon for Nimbostratus rankNimbostratus
Mar 19, 2007

What wrong with this irule

Could someone tell me what wrong with code below?

 

 

if { NODE:[LB::server]) eq "172.16.1.15"} {

 

TTP::redirect "http://www.test.com/signon.htm"

 

}

 

 

I got the error:

 

 

01070151:3: Rule [new_rule] error:

 

line 5: [parse error: PARSE syntax 232 {syntax error in expression " NODE:[LB::server]) eq "172.16.1.15"": variable references require preceding $}] [{ NODE:[LB::server]) eq "172.16.1.15"}]

 

 

 

Thanks,

 

 

4 Replies

  • Deb_Allen_18's avatar
    Deb_Allen_18
    Historic F5 Account

     

    Are you trying to redirect only if a specific pool member was chosen, or if a specific virtual server is being hit, or something else?

     

     

  • You have a ) in your line, and I don't know what NODE is supposed to be. Try:

    
    if {[LB::server addr] eq "10.0.0.25"} {
       HTTP::redirect "http://www.test.com/signon.htm"
    }

    Note: Untested.