Forum Discussion
Angelo_5130
Nimbostratus
Oct 22, 2010iRule to rewrite domain not working:(
Hi all,
I am very new to iRules and I was trying to write an iRule to rewrite the domain in the cookie inserted by the LTM default cookie persistence profile.
- Virtual Server is defined as HTTPS and the default HTTP profile is associated to it
- A Cookie persistence profile is associated to the virtual server:
- Parent profile: cookie
- Cookie Method: Insert
- Cookie name: My_cookie
By searching in the the forum I found the following:
when HTTP_RESPONSE {
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" ".mydomain.com"
}
}
However, when I try to apply the iRule I see that no cookie at all is sent back (instead of the My_cookie one).
Does anybody have an idea on what might be causing this?
Thanks a lot in advance!
3 Replies
Sort By
- hoolio
Cirrostratus
Hi Angelo, - hoolio
Cirrostratus
Hi Angelo,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" ".mydomain.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]" }
- hoolio
Cirrostratus
Hi Angelo,
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