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 ...
L4L7_53191
Nimbostratus
Aug 24, 2009I see you may have a redirect loop:
A tiny test shows:
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/cc/Claim" } {
HTTP::redirect "http://[HTTP::host]/cc/Claim/Claim.do"
}
}
Ends up in a redirect loop for me: firefox shows that "this page isn't redirecting properly" or a similar message. Dumping the HTTP headers confirms this.
But changing [HTTP::uri] "starts_with" to "ends_with" works properly for me:
when HTTP_REQUEST {
if { [HTTP::uri] ends_with "/cc/Claim" } {
HTTP::redirect "http://[HTTP::host]/cc/Claim/Claim.do"
}
if { [HTTP::uri] ends_with "Claim.do" } {
HTTP::respond 200 content "You made it!!"
}
}
gives me the expected result, as well as the full URI in the browser address bar as expected.
I hope this helps.
-Matt
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