Forum Discussion
Chris_Phillips
Nimbostratus
Sep 26, 2006stream profile not rewriting 302's
Hi,
this isn't really iRule related, but as it was here that showed me the light baout using stream instead of HTTP::collect and regsub, i'm hoping you'll let this pass.
I have a s...
hoolio
Cirrostratus
Sep 26, 2006A one-liner for the Location header rewrite? This is close (no variables anyhow). Also, string map should be more efficient than regsub.
when HTTP_RESPONSE {
if { [HTTP::status] contains "302" && [string tolower [HTTP::header Location]] contains "host_to_replace" }{
HTTP::header replace Location [string map -nocase {"host_to_replace" "new_host"} [HTTP::header Location]]
}
}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
