F5 iRules Data Plane Programmability > 2. Application Flow Control with iRules > 2.1. Labs - Application Flow Control with iRules > 2.1.6. iRules Summary Source | Edit on
2.1.6.3. Lab 3 - Complete iRuleΒΆ
Completed iRule
# HTTP_to_HTTPS_iRule
when HTTP_REQUEST {
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
}
# Factory F5 https redirect iRule
when HTTP_REQUEST {
HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri]
}