demmo_251289
Oct 12, 2016Nimbostratus
Redirect to different domain also force http to https
Hi guys,
I have three domains (a, b and c) and i want to redirect first two of them (a,b) to the last (c), also force http to https for all of them.
I put together below rule which works but I wonder how this can be simplified
this works for all cases except http://c
if { [HTTP::host] eq "a" or [HTTP::host] eq "b"} {
HTTP::redirect "https://c[HTTP::uri]"
return
}
this is to force http://c to https://c
elseif {([TCP::local_port] == 80) and [HTTP::host] equals"c"}{
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
return
}
Thank you