Forum Discussion
DaveC_53879
Aug 09, 2011Nimbostratus
Persistence with and without www in URL
Is there a way to be persistent when URLs sometime but not always include www? Customers sometimes update contents, and sometimes they use static paths that may or may not contain www in the URL, but...
DaveC_53879
Aug 15, 2011Nimbostratus
Aaron
I applied the irule as written in the link you referenced except for changing the domain name, but it is not quite working as expected. If I go to domain.com, and then to or any other something.domain.com, it is persistent, but if I go to http://www.domain.com/, a.domain.com, and domain.com, say in that order, I am not persistent and get the next server in rotation. Once I hit domain.com, then my session becomes persistent to whichever server domain.com is persistent to, so this only fixes part of my problem. Have I missed a step?
when HTTP_RESPONSE { log local0. "[IP::client_addr]:[TCP::client_port]: Pre Set-Cookies: [HTTP::header values Set-Cookie]" Check if the persistence cookie exists in the response if {[HTTP::cookie exists "My_cookie"]} { set the domain attribute on the persistence cookie HTTP::cookie domain "My_cookie" ".ddcpoc.com" log local0. "[IP::client_addr]:[TCP::client_port]: Modified domain on My_cookie" } log local0. "[IP::client_addr]:[TCP::client_port]: Post Set-Cookies: [HTTP::header values Set-Cookie]" }
How do I copy a rule into this forum and retain the formatting?
Thanks,
Dave
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