Forum Discussion
John_43161
Nimbostratus
Oct 08, 2008Replace a query string variable value
This should be pretty straight forward but am having problems finding a way to change a query string variable value. basically I have an encoded url in the query string that I need to change to a dif...
Oct 08, 2008
Give this a shot:
when HTTP_REQUEST {
HTTP::uri [string map {"rbweb--dev%2egerbc%2erbcmtg%2ecom" "172%2e16%2e20%2e83"} [HTTP::uri]]
}
When you said it didn't work for values, what did you mean? I tested this out with a test URL of
http://myserver/foo/bar?TARGET=-SM-http%3a%2f%2frbweb--dev%2egerbc%2erbcmtg%2ecom%2fcar%2f
and it changed it and sent it to the backend server as
http://myserver/foo/bar?TARGET=-SM-http%3a%2f%2f172%2e16%2e20%2e83%2fcar%2f
Of course, if you need to expand this, you could put the relevant URL's in a class and do a lookup and then a replace based on a match in the class but you only specified that you had one url to change.
Hope this helps...
-Joe
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