Forum Discussion
deltapez_21676
Nimbostratus
Apr 21, 2008http to https irule
The following irule was added to redirect any HTTP response from the port 80 web servers to HTTPS. It seems to have a recursion problem and will return an extra "s" (HTTPsS://example.com) in t...
hoolio
Cirrostratus
Apr 21, 2008Hi,
In theory, the string map command should only ever replace http:// with https:// one time. Can you add logging to the rule to see what the Location header value is before you make the change and after?
when HTTP_RESPONSE {
if { [HTTP::status] == 302" } {
log local0. "[IP::client_addr]:[TCP::client_port]: Rewriting [HTTP::header Location] to [string map {http:// https://} [HTTP::header Location]]"
respond with 302 using original Location value
HTTP::respond 302 Location [string map {"http://" "https://"} [HTTP::header Location]]
}
}Aaron
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