Forum Discussion
Kenny_Koulabout
Nimbostratus
Dec 03, 2014Need help rewriting the middle of a URI
I am unsure of how to rewrite the middle of a uri.
What I am trying to accomplish is this:
www.company.com/common/images/sbox/common/images/sbox/any.jpg
and removing the repeating portion of th...
Kenny_Koulabout
Nimbostratus
Dec 04, 2014The systems engineer that was working with me was seeing what uri was being passed using Fiddler. What finally ended up working for me was a modification of another iRule that was implemented before.
if { ([string tolower [HTTP::uri]] equals "/common/images/sbox/common/images/sbox") or ([string tolower [HTTP::uri]] starts_with "/common/images/sbox/common/images/sbox/")} {
HTTP::uri "/common/images/sbox/[findstr [HTTP::uri] /common/images/sbox/common/images/sbox/ 39]"
pool www.company.com-80
I am still very new to all of this and do not fully understand how the findstr and the string range commands work. Can you explain the difference between your solution and mine is?
Thanks in advance!
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