KJ_50941
Sep 28, 2012Nimbostratus
iRule hlep
I need to redirect from http to https , also since some users have bookmark specific port for exmaple port 8050 in their browser to be redirect to https. how do I do that.
does this works...
Thx, our requiremnets is to redirect HTTP to HTTPS and secondly if some user has bookmark port:8050 they also need to redirect to https.
does this will work?
when HTTP_REQUEST {
HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri]
}
or
when HTTP_REQUEST {
if {[TCP::local_port] != 443}{
HTTP::redirect " [HTTP::host] ":" 1][HTTP::uri]"
}
}
}
also what does getfield do?
thx in advanced.