Redirection http to https
Hello, Need helps
So, I want to redirect my host http to https.
To do , I tried the different soltions propoesed by F5 such as :
the irule :
when HTTP_REQUEST {
if { ([HTTP::host] equals "abc.com") } {
if {[HTTP::has_responded]}{return}
log local0. "[HTTP::host] [HTTP::uri]"
HTTP::respond 301 Location "https://[HTTP::host][HTTP::uri]"
regsub -all {:\d*$} [HTTP::host] "" host
HTTP::redirect https://$host[HTTP::uri]
return
}
}
and:
when HTTP_REQUEST {
if { ([HTTP::host] equals "abc.com") }
{ HTTP::respond 301 Location "https://[HTTP::host][HTTP::uri]"}
}
and
when HTTP_REQUEST {
if { ([HTTP::host] equals "abc.com") }
{ HTTP::redirect "https://[HTTP::host][HTTP::uri]"}
}
I also tested the policy LTM.
in both test, I got the same probleme : so the redirection don't work in some browser : for few minutes i get an error conexion reset.
if one of you has ever had to deal with this , please tell me what to do !
best regards,