Forum Discussion

msaunders's avatar
msaunders
Icon for Nimbostratus rankNimbostratus
Jul 24, 2018

cookie related issue with a rewrite profile

I created the rewrite profile on the LTM, and assigned it to a VIP: Client URI: / Server URI: hostname.domainname/path

 

If I access the server directly (hostname.domainname/path), the JSESSIONID cookie remains the same with each page refresh, and the site works correctly.

 

If I access the server via the new URL that points to the VIP (https://newURL.com), the value of the JSESSIONID cookie changes with each page refresh. Also, I never see request cookies, just response cookies. So, though the cookie is being received by the browser, the browser does not appear to be using it. I tried adding a Set-Cookie rule to the rewrite rule based on the cookie contents, but this did not resolve the issue.

 

How can I get the browser to use the cookie that it ie receiving?

 

1 Reply

  • Sounds like the Domain in the cookie during the response does not match the hostname used in the browser during the request.

     

    When you see the JSESSIONID cookie in the response what is the Domain value? Is it the same as the hostname used in the request.

     

    If not then you can either look to edit your web server configuration so the JSESSIONID matches the requesting Host header or look at an iRule/Policy to change the Domain in the Set-Cookie header during the response.