Forum Discussion
pedinopa_170325
Nimbostratus
Aug 27, 2015HTTPS to HTTP rewrite
I need an irule which will rewrite a hosts response from HTTPS to HTTP.
Kevin_Stewart
Employee
Aug 27, 2015A server's response? Is the response a 30x redirect or URLs in the payload?
when HTTP_REQUEST {
HTTP::header remove Accept-Encoding
STREAM::disable
}
when HTTP_RESPONSE {
if { ( [HTTP::header exists Location ) and ( [HTTP::header Location] contains "https://" ) } {
HTTP::header replace Location [string map -nocase {"https://" "http://"} [HTTP::header Location]]
}
if { [HTTP::header Content-Type] contains "text" } {
STREAM::expression {@https://@http://@}
STREAM::enable
}
}
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