Forum Discussion

Jason_Cain_9729's avatar
Jason_Cain_9729
Icon for Nimbostratus rankNimbostratus
Sep 13, 2005

Checking for cookie existence

Hello all,

 

 

We are trying to use the BIGIP's to check for the existence of a cookie before allowing

 

a request in to a particular website. Basically this is a SSO attempt on a referral

 

from another site. The text we came up with is:

 

 

 

if (exists http_cookie("IntelligenceSession")) {

 

use pool servers1

 

}

 

else {

 

redirect to "http://www.yahoo.com"

 

}

 

 

 

The syntax is accepted and yet the rule never allows access to pool servers1.

 

Anyone have any ideas on what we are doing wrong?

 

2 Replies

  • Martin_Machacek's avatar
    Martin_Machacek
    Historic F5 Account
    Jason,

     

     

    what happens when you access the virtual server that uses the rule? Do you get the redirect?

     

     

    The rule is correct and assuming that you spelled the cookie name correctly (the match is case-sensitive) it should work.
  • Hello,

     

     

    Thanks for replying.

     

     

    You can forget about this one. Turns out the domain of the site and the domain on the cookie did not match. That was fixed and this rule works fine.

     

     

    Thanks.