Forum Discussion
Adrian_Turcu_10
Nimbostratus
Oct 30, 2007Help With HTTP_RESPONSE
Hello Gurus
Could someone help me with a quick rule to replace a header in the response back to the client, please?
My problem is like follows: we have a poxi app (not proxy) and t...
David_Homoney
Nimbostratus
Oct 30, 2007when HTTP_REQUEST {
set shost [getfield [HTTP::host] ":" 1]
set sport [getfield [HTTP::host] ":" 2]
set suri [HTTP::uri]
}
when HTTP_RESPONSE {
if { [HTTP::status] starts_with "3" } {
if { $sport equals "443" } {
HTTP::redirect https://$shost$suri
} else {
HTTP::redirect http://$shost$suri
}
}
}
The should due the trick.
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