Forum Discussion
Hannes_Rapp
Mar 25, 2015Nimbostratus
A single iRule on your port 80 Virtual Server will do. Remove everything else, except:
when HTTP_REQUEST {
if { (([HTTP::host] == "oservices.bahrain.bh") && ([string tolower[HTTP::path]] == "/pubportal/insurancedetailsuploadws/services/insuranceuploadimpl")) }{
return
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
}
}
Good luck! PS: Try my iRule with skepticism and preferably do it during a non-peak hour (or during a maintenance window)!
- Hannes_RappMar 25, 2015NimbostratusFor Further Troubleshooting: In case you're still in the same situation as before, you should make sure the back-end server is not responding back with a redirect which includes reference to HTTP protocol, instead of HTTPS. All server-side hard-coded HTTP protocol redirects are to be adjusted for a migration to HTTPS. From your side, you can verify the redirects. On an UNIX/Linux machine use the cURL program. On a Windows Machine use your web-browser: Firebug AddOn for Mozilla Firefox, or DevTools for Chrome: * Issue a command: "curl -vI http://oservices.bahrain.bh" - This should be redirected to HTTPS. In the response headers section you're expecting to see: Location : https://oservices.bahrain.bh Server : BigIP If so, you will know the F5 iRule does it's job. Now make a second cURL request to track down where https://oservices.bahrain.bh is redirected - does the back-end server redirect to another plain HTTP page?