Forum Discussion
Steve_Brown_882
Mar 10, 2011Historic F5 Account
create_user_3 in a perl script
Hey Guys,
I don't do a lot of perl scripting so I am hoping for a little help getting a script to work. Basically I have pieced som code together from the forums but it doesn't quite work. ...
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
- Adam_Aronow_842Oct 05, 2011
Nimbostratus
Addendum: I'd also be open to using Python. - Hi Adam,
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