Forum Discussion
Jim_Gore_43214
Nimbostratus
Oct 26, 2006Need to modify host name/port in node generated redirect
Hello,
I am attempting to move some web sites under the F5 v9.2.3 without modifing the site itself. There are redirects from the sites and absolute links in the generated pages.
I...
Colin_Walker_12
Nov 02, 2006Historic F5 Account
I think you can probably accomplish the same thing with a little simpler, and certainly more efficient code by making use of the string map command like this:
when HTTP_RESPONSE {
if { [HTTP::is_redirect] } {
log local0. "Request redirected."
log local0. "[HTTP::header names]"
log local0. "[HTTP::header Location]"
set $newURL [string map -nocase {http https rb13 epbt2 :8050 ""} [HTTP::header Location] ]
HTTP::header replace Location $newURL
}
}
This should process each key/value pair in order for the string in question. You can read more about this command on sourceforge in TCL's docs - Click here
HTH,
Colin
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
