Forum Discussion
bkulawiak_10352
Nimbostratus
Feb 19, 2015https redirect and ssl offload
I have a new site which I set up so that all http requests get redirected to https and does ssl termination at the f5. this seems to be working initially. the http request is terminated, redirects ...
giltjr
Nimbostratus
Feb 19, 2015Can you post your iRule? It sounds like you are redirecting for a single specific URI instead of anyall URI's.
The other thing you might be able to do is setup a stream profile so that on any/all HTTP response you replace http://test.com with https://test.com.
You can do something like belows. If you have two virtual servers, one for http and one for https, you need to use this this on both of them.
when CLIENT_ACCEPTED {
if {[TCP::local_port] eq 443 } {set SSL 1} else {set SSL 0}
}
when HTTP_REQUEST {
if {!$SSL} {
HTTP::respond 302 Location "https://[HTTP::host][HTTP::uri]"
}
}
when HTTP_RESPONSE {
STREAM::disable
STREAM::expression "(http|HTTP)://test\.com/https://test\.com/"
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
