Forum Discussion
Hannes_Rapp_162
Nacreous
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
Hannes_Rapp_162
Apr 08, 2015Nacreous
Have taken a look at the response header - it appears that something in between modifies the request path and the "/pubportal" substring is eaten up, before the request is even routed to F5 BigIP. Do you have another proxy in between your desktop(test machine) and the F5 BigIP?
< location: https://oservices.bahrain.bh/InsuranceDetailsUploadWS/services/InsuranceUploadImpl
As a workaround in F5, you can further modify the iRule and replace the conditional IF statement with:
if { ([HTTP::host] equals "oservices.bahrain.bh") && ( [string tolower [HTTP::path]] contains "/insurancedetailsuploadws/services/insuranceuploadimpl" ) }{