Forum Discussion
Pedro_Gonzalez_
Nov 17, 2006Nimbostratus
Persistence with Subdomains
We have been using standard cookie persistence with our www.mycompany.com domain and it has worked fine.
Our new redesign web site is using subdomains for product categories like apparel.mycompany.com, shoes.mycompany.com and now persistence is lost.
F5 tech support suggested we write an iRule to keep a customers session on the same server with the www.mycompany.com but I'm new to iRules and don't have a clue where to start.
I've seen some examples here but nothing like what we need.
Does anyone have any ideas?
Thanks.
Pedro
- hooleylistCirrostratusHi Pedro,
when HTTP_RESPONSE { if {[HTTP::cookie count] > 0 } { foreach aCookie [HTTP::cookie names] { if { $aCookie == "my_persistence_cookie" } { HTTP::cookie domain $aCookie mycompany.com } } } }
- Pedro_Gonzalez_NimbostratusAaron,
- hooleylistCirrostratusThat sounds right for the default cookie name. Are you able to test this?
- Pedro_Gonzalez_NimbostratusI have the iRule setup but I'm waiting for development to setup the correct web site for testing. I'll let you know how I make out. Thanks.
- Pedro_Gonzalez_NimbostratusI tried the following iRule and going from www.company.com to apparel.company.com the BigIP sent me to a different server.
- hooleylistCirrostratusIf you're using cookie insert persistence, the cookie name should start with BIGipServer, but also contain the pool name (Click here).
when HTTP_RESPONSE { if {[HTTP::cookie count] > 0 } { foreach aCookie [HTTP::cookie names] { log local0. "Cookie name: $aCookie" if { $aCookie == "BIGipServer" } { HTTP::cookie domain $aCookie company.com } } } }
- Pedro_Gonzalez_NimbostratusAaron,
- zaferNimbostratusHello
- hooleylistCirrostratusHi Zafer,
- zaferNimbostratusHi Aaron,
Recent Discussions
Related Content
Â
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects