Forum Discussion
nich_66940
Nimbostratus
Sep 27, 2007Rewriting 302 redirects
We have come 'intelligent' website code that redirects the user to SSL pages based on what the developer originally thought best.
As we are using SSL offloading on the BigIP this has meant t...
nich_66940
Nimbostratus
Sep 27, 2007Thanks that was really helpful. I think I am going to use matchclass due to the number of URLs to rewrite.
Current code is below and this appears to be doing the right thing.
when HTTP_RESPONSE {
if { [HTTP::status] == "302" } {
if { [matchclass [string tolower [HTTP::header "Location"]] starts_with $::sslLocations] } {
HTTP::header replace "Location" [string map {http https} [HTTP::header "Location"] ]
}
}
}
nich.
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
