Forum Discussion
James_78615
Nimbostratus
Apr 21, 2009Cookie persistence for certain host headers
Hi,
I have the requirement to enable cookie persistence when a user hits a particular subdomain for a site.
For example, insert a cookie and use cookie persistence for abc.site.com but any other requests for *.site.com should be load balanced without persistence.
Is this possible using the following rules?
profile persist abc_passive_cookie
defaults from cookie
mode cookie
cookie mode passive
cookie name "abc_passive_cookie"
virtual WebVS
pool WebPool
destination 1.1.1.1:http
ip protocol tcp
rules abc_persist_cookie_insert
profiles
http
tcp
persist abc_passive_cookie
rule abc_persist_cookie_insert
when HTTP_REQUEST {
if { ([string tolower [HTTP::host]] starts_with "abc.") } {
persist cookie insert abc_persist_cookie
}
}
Thanks
James
- The_Bhattman
Nimbostratus
Hi James,when HTTP_REQUEST { if { not ([string tolower [HTTP::host]] equals "abc.site.com") } { persist none } }
- James_78615
Nimbostratus
Thanks CB, that works great. - hoolio
Cirrostratus
No, you must have a cookie insert persistence profile added to the VIP in order to use 'persist cookie insert'.
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