Forum Discussion
Milan_4483
Mar 16, 2011Nimbostratus
irule: http to https for a specific host
Hello, I have the following issue and need a way to redirect a specific host. Issue: User types https://www.xyz.com/abc in the browser, request hits F5 which decrypts and forwa...
hvwees_37575
Nov 21, 2012Nimbostratus
Posted By Michael Yates on 03/17/2011 09:07 AM
You can capture the protocol in the HTTP::header on the Response and change it.
Try this and let me know if it works for you.
when HTTP_RESPONSE { if { [ HTTP::is_redirect] and [URI::protocol [HTTP::header "Location" ]] eq "http" } { set path [findstr [HTTP::header "Location" ] "//" 2 ] HTTP::header replace "Location" "https://$path" } }
I really needed this and it works like a charm!
I like to fix such things on the F5, instead of educating application developpers. 😉
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