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 24, 2009If the client is making a request to /cc/Claim using the above iRule, they should get redirected to /cc/Claim/Claim.do. I'd guess either there is a mismatch in the URI listed in the rule versus what the client is requesting or the redirect is being made but the client isn't seeing it possibly because another redirect from the app. Can you add logging to the iRule and use a browser plugin as Matt was alluding to like HttpFox for Firefox or Fiddler for IE?
when HTTP_REQUEST {
log local0. "[IP::client_addr]:[TCP::client_port]: New [HTTP::method] request to [HTTP::uri]"
if {[HTTP::uri] starts_with "/cc/Claim"}{
log local0. "[IP::client_addr]:[TCP::client_port]: Matched URI check, redirecting to http://[HTTP::host]/cc/Claim/Claim.do"
HTTP::redirect "http://[HTTP::host]/cc/Claim/Claim.do"
} elseif { [HTTP::cookie exists "JSESSIONID"] } {
log local0. "[IP::client_addr]:[TCP::client_port]: jsessionid cookie exists, persisting with it."
persist uie [HTTP::cookie "JSESSIONID"]
} else {
log local0. "[IP::client_addr]:[TCP::client_port]: Check for jsessionid in URI"
set jsess [findstr [HTTP::uri] "jsessionid" 11 ";"]
if { $jsess != "" } {
log local0. "[IP::client_addr]:[TCP::client_port]: Found jsessionid in URI"
persist uie $jsess
}
}
}
when HTTP_RESPONSE {
if { [HTTP::cookie exists "JSESSIONID"] } {
log local0. "[IP::client_addr]:[TCP::client_port]: Persisting based on response jsessionid cookie"
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