Forum Discussion

jackwik_134864's avatar
jackwik_134864
Icon for Nimbostratus rankNimbostratus
Nov 29, 2017

Irule Redirect and cookie inser not working as expected

Hi,

 

I am trying to achieve the following:

 

1). Cookie Insert 2). Define the domain name 3). When redirecting using the original cookie that was received before redirection took place.

 

IRULE is as follows

 

when HTTP_RESPONSE {

 

Check if the persistence cookie exists in the response if {[HTTP::cookie exists "Mobile"]} { set the domain attribute on the persistence cookie HTTP::cookie domain "Test" ".888sport.com" if { [HTTP::is_redirect] } { foreach aCookieName [HTTP::cookie names] { set currentCookie "$aCookieName=[HTTP::cookie value $aCookieName]" set cookies "$cookies\r\nSet-Cookie: $currentCookie" }

 

}

 

} }

 

Attached screenshot. Any suggestions/help much appreciated.

 

Thanks.

 

Jack.

 

No RepliesBe the first to reply