Forum Discussion
Steve_Brown_882
Jul 07, 2009Historic F5 Account
transforming a portion of the URI
I am wondering if anyone has any ideas on how I might complete the following task
Basically I need to search for a URI that contains "/something..." and change it to "/anotherURI...".
An example www.site.com/abc/newpage/... should become www.site.com/def/newpage/... when forwarded to the backend.
I am thinking I might be able to use a stream profile, but this seems like it might not be the best options since I know I am only looking at the HTTP::uri.
2 Replies
- Steve_Brown_882Historic F5 AccountOk sorry for this post, I should have searched first. I found a solution for me that worked in this blog post. http://devcentral.f5.com/weblogs/joe/archive/2005/07/27/ModifyingUriWithoutRedirect.aspx
THis only worked because I was able to confirm the uri would always start a certain way. Any ideas if this had not been the case? - hoolio
Cirrostratus
There are quite a few string manipulation commands in TCL and some custom ones in iRules that you could use for scenarios like that:
getfield
split + lindex
string first + string range
scan
You can check the iRules wiki and the TCL man pages for details/examples:
http://devcentral.f5.com/wiki/default.aspx/iRules.Functions
http://www.tcl.tk/man/tcl8.4/TclCmd/contents.htm
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
