Forum Discussion
Anish_Srivastav
Nimbostratus
Nov 01, 2010Need help with parsing URI
Greetings!
I have a bunch of URI's in our application like the following http://foo.bar.com/wiki/a/b/e.html http://foo.bar.com/wiki/p/q/r/s/t.html http://foo.bar.com/wiki/x/...
hoolio
Cirrostratus
Nov 01, 2010Hi Anish,
You can trim off the /wiki using string range:
when HTTP_REQUEST {
Check if URI starts with /wiki/
if {[HTTP::uri] starts_with "/wiki/"}{
Send a local redirect without the /wiki string
HTTP::respond 301 Location [string range [HTTP::uri] 5 end]
}
}
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
