Forum Discussion
I have the same requirement, if user access the URL with HTTPS, no change in URL. If user access the URLwith HTTP, should redirect to https, I am also using non-standard port URLS.
https://abc.com:8888 ==> no change
http://abc.com:8888 ==> redicet to https://abc.com:8888
It's perfectly working fine with below config
1) Create SSL Client profile with allowing Non-SSL Connections ( You need to modify default config)
2) Create VIP with 8888 port and use SSL client profile
3) Configure below iRule
when HTTP_REQUEST {
if { [URI::protocol [HTTP::uri]] eq "http" } {
HTTP::redirect https://[getfield [HTTP::host] ":" 1]:[TCP::local_port][HTTP::uri]
}
}
- Stanislas_Piro2Jan 25, 2017Cumulonimbus
Hi,
how do you get protocol from
?[HTTP::uri]
when a user request http://abc.com:8888/def.txt,
return only /def.txt[HTTP::uri]
the solution provided by hoolio is the solution.