Forum Discussion
Replacing JESSIONID in the URI with contents of JSESSIONID cookie
Something like this perhaps:
when HTTP_REQUEST {
set j_uri [findstr [string tolower [HTTP::uri]] ";jsessionid=" 12]
if { ( $j_uri ne "" ) and ( [HTTP::cookie exists JSESSIONID] ) } {
if { $j_uri ne [HTTP::cookie value JSESSIONID] } {
set newuri [string map "$j_uri [HTTP::cookie value JSESSIONID]" [HTTP::uri]]
HTTP::redirect "http://[HTTP::host]$newuri"
}
}
}
Admittedly this is a crude example. I wasn't sure exactly how the jsessionid is formatted in the URI (part of the path, a query string value), or what (if any) values were after it and how they are delimited. Ultimately you'll need to tweak the findstr function to extract the jsessionid value from the URI. If the jsessionid value in the URI doesn't match the JSESSIONID cookie value, create a new URI by replacing the original value with the cookie value and then redirect the user to the new URI (with matching cookie).
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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