Alice_214810
Jan 15, 2016Nimbostratus
Advisory on http to https redirection
This is the existing iRule at http virtual server to redirect to https. SSL offloading is done at F5. Please advise what does this irule mean? If my understanding is correct, it will mask out some header in http request. My another question is that what is the different between TCP respond and SSL respond? Is it suitable to implement TCP:respond here instead of SSL::respond? Kindly advise on the functionality of below iRule.
when HTTP_REQUEST {
log local0. "[HTTP::host] + [HTTP::uri]"
if {[TCP::local_port] == 80 } { set my_loc "https://[HTTP::host][HTTP::uri]" TCP::respond "HTTP/1.1 302 Found\r\nLocation: $my_loc\r\nConnection: close\r\nContent-Length: 0\r\n\r\n" TCP::close } }