Forum Discussion
abachman_72712
Nimbostratus
Aug 21, 2009Append to uri
I need to append to the uri that the user types. The client browser needs to see the addition for a certain java function to work properly. We are using an existing iRule for cookie persistence, and ...
hoolio
Cirrostratus
Aug 21, 2009As Matt suggested, if you want to redirect the client, you should do it before anything else in the HTTP_REQUEST event:
when HTTP_REQUEST {
log local0. "Request: [HTTP::uri]"
if {[HTTP::uri] starts_with "/cc/Claim"}{
HTTP::redirect "http://[HTTP::host]/cc/Claim/Claim.do"
} elseif { [HTTP::cookie exists "JSESSIONID"] } {
persist uie [HTTP::cookie "JSESSIONID"]
} else {
set jsess [findstr [HTTP::uri] "jsessionid" 11 ";"]
if { $jsess != "" } {
persist uie $jsess
}
}
}
when HTTP_RESPONSE {
if { [HTTP::cookie exists "JSESSIONID"] } {
persist add uie [HTTP::cookie "JSESSIONID"]
}
}
Aaron
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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