Forum Discussion
zia_101571
Nimbostratus
Nov 02, 2007redirect HTTP to HTTPs
Hi
We have f5 load balancer 9.X. Our SSL certificate is loaded in F5. Communication between F5 and webservers are done through port 80. We want to know how to build a I-rule so it can trap response 302 http to redirect to HTTPS. I have open a case with f5 C385918,My support engineer Brant aske me post this request to your site
- hoolio
Cirrostratus
Hi there,when HTTP_RESPONSE { Enable debug logging to /var/log/ltm? 1=yes, 0=no set debug 1 Check if the response is a redirect (3xx) if {[HTTP::status] starts_with "3"}{ if {$debug}{ log local0. "Original Location: [HTTP::header value Location], Updated Location: [string map {http: https:} [HTTP::header value Location]]" } Use 'string map' to replace http: with https: HTTP::header replace Location [string map {http: https:} [HTTP::header value Location]] } }
- zia_101571
Nimbostratus
Thank you for the script. When we apply the script it failed because of following - hoolio
Cirrostratus
Sorry, I missed the close bracket on HTTP::status. That line should be:
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