jkeyser_44143
Aug 12, 2009Nimbostratus
Help with irule to re-write http to https and keep uri
I have a virtual server listening on 443 and using ssl. The pool that this points to uses http over port 8080. When a user hits the LTM virtual server they get redirected by the nodes in the pool to http and a new URI. The address bar shows the redirect as desired but the protocol is now HTTP instead of HTTPS. Simply putting https into the browser address bar corrects the problem.
for example.
user goes to https://host
the response they get back is http://host/uri
I need the response they get back as https://host/uri
What is a simple I rule that I can use that will take the HTTP response that the node gives, convert it to https and keep the URI that the node directed the user to. I have tried the simple redirect on HTTP_REQUEST script below but it does not work.
Any help?
when HTTP_REQUEST {
HTTP::redirect https://[getfield [HTTP::host] ":" 1]
}