Forum Discussion
Vince_Beltz_959
Sep 21, 2011Nimbostratus
String Map Fail?
Argh. Can't seem to edit out all that MS crap up there, because I copied this in from an email.
I'm trying to build a function allowing search-and-replace of substrings within a URI. ...
hooleylist
Sep 21, 2011Cirrostratus
Hi Vince,
A few things:
1. Prior to v11.0, most HTTP:: command values were cached in the same event. So this example below would modify the URI to /new_uri, but the log commands would both show the original URI:
log local0. "1 - URI: [HTTP::uri]"
HTTP::uri "/new_uri"
log local0. "2 - URI: [HTTP::uri]"
This was fixed in v11. For past versions, if you want to use the new URI you can save the value to a variable.
2. You're using 'set HTTP::uri $newuri'. This would create a new variable named $HTTP::uri. If you want to modify the URI, use 'HTTP::uri $newuri'.
3. I don't see where you're defining $httpuri. Is this just a test you're doing instead of using [HTTP::uri]?
Aaron
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