Hi Ahmad, I've modified the iRule a bit, this should work across all v11.x versions.
when HTTP_REQUEST {
if { ([HTTP::host] equals "oservices.bahrain.bh") && ( [string tolower [HTTP::path]] equals "/pubportal/insurancedetailsuploadws/services/insuranceuploadimpl" ) }{
log local0. "Client: [IP::client_addr]: Requested [HTTP::host][HTTP::uri]. HTTPS redirect omitted"
} else {
HTTP::respond 302 location "https://[HTTP::host][HTTP::uri]"
log local0. "Client: [IP::client_addr]: Requested [HTTP::host][HTTP::uri]. Redirected to HTTPS"
TCP::close
}
}
Test with logging enabled: "curl -vI oservices.bahrain.bh/pubportal/InsuranceDetailsUploadWS/services/InsuranceUploadImpl"
Apr 8 12:26:18 bigip1 info tmm1[12385]: Rule /Common/asd : Client: xx.xx.xx.xx: Requested oservices.bahrain.bh/pubportal/InsuranceDetailsUploadWS/services/InsuranceUploadImpl. HTTPS redirect omitted