Forum Discussion

Ron_Echeverri_7's avatar
Ron_Echeverri_7
Icon for Nimbostratus rankNimbostratus
Jul 17, 2007

iRule to rewrite cookie?

Right now, our BigIP is setting a cookie for session persistence. In addition to our main www.example.com site, we have various partner sites in the form of partner1.example.com, partner2.example.com, etc. In each case, the cookie's hostname reflects the partner site, except for our main site, where the hostname just says "example.com" (and not www.example.com).

 

 

What we need is an iRule that changes the way the cookie is set so that its hostname is always "example.com", regardless of the partner site. Any help is very welcome. Thanks!
  • hoolio's avatar
    hoolio
    Icon for Cirrostratus rankCirrostratus
    Hi,

     

     

    Take a look at the last example in this post for an example of how to hardcode the domain for the persistence cookie: (Click here)

     

     

    Check the HTTP::cookie wiki page for details:

     

    (Click here)

     

     

    Aaron
  • hoolio's avatar
    hoolio
    Icon for Cirrostratus rankCirrostratus
    No problem. Holler if you have any questions...

     

     

    Aaron