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 all requests are to the same virtual server. Is there a way to stay persistent in this case? Cookie persistence isn't working, and I understand why, so I'm not sure if any other type of persistence will work. Rewriting the URL, or doing any kind of redirect isn't an option, because of the nature of some of the requests.
Thanks in advance.
- hooleylistCirrostratusHi Dave,
- DaveC_53879NimbostratusThanks Aaron. I'll give it a try.
- DaveC_53879Nimbostratus
Aaron
- Colin_Walker_12Historic F5 AccountHmmm, the formatting should be preserved by just copy and pasting. Try adding code tags around it next time:
- DaveC_53879NimbostratusUpdating the cookie to maintain persistence across all sub-domains is what I meant. I have a test site setup with only this one rule in place, so not sure what I could do different. Any ideas?
- DaveC_53879NimbostratusThis part of the rule isn't doing anything because it's not logging. Do I need to define My_cookie somewhere?
- Michael_YatesNimbostratusIf you are trying to create a custom cookie take a look here:
- hooleylistCirrostratusJust change My_cookie to the cookie name you want to rewrite the domain for. If you're using the default cookie name for the cookie insert persistence profile, you can use this:
Check if the persistence cookie exists in the response if {[HTTP::cookie exists "BIGipServer[LB::server name]"]} { set the domain attribute on the persistence cookie HTTP::cookie domain "BIGipServer[LB::server name]" ".ddcpoc.com" log local0. "[IP::client_addr]:[TCP::client_port]: Modified domain on BIGipServer[LB::server name]" }
- DaveC_53879NimbostratusThanks for the responses. I had actually tried using a named cookie yesterday but got some strange results and I get the same strange results today, but now I see where the problem is. I've been using IE8 and FF4 to test. IE8 is now working correctly, as it is inserting the correct domain name in the cookie and so stays persistent regardless of the sub-domain. Thanks for the help getting this working. I see the same results in FF 3.6.17.
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