Forum Discussion
Bob_10976
Nimbostratus
Jul 11, 2011Help with HTTP redirect in ALL directions
Hello all,
We have been using the standard HTTP redirect irule, (posted below) that comes with our LTM, ver 10.2.0, for sometime now. However I'm being told now that this not only needs to be a...
Colin_Walker_12
Jul 11, 2011Historic F5 Account
Ahh, so you don't actually want an outbound redirect, what you want is a header rewrite on the response. That makes more sense.
So all you'd need is something like:
when HTTP_RESPONSE {
if {[HTTP::header exists "Content-Location"] } {
HTTP::header replace "Content-Location" [string map {http://yourdomain https://yourdomain} [HTTP::header "Content-Location"]]
}
}
This would change every occurrence of http://yourdomain in the Content-Location header to https://yourdomain.
Is that what you're looking for?
Colin
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