N__197982
Jun 23, 2015Nimbostratus
Understanding one of the iRules I found on the devcentral links.
Folks,
We came across an request from the applications team where they wanted a VIP listening on port 8080(http) to forward requests on port 443(https).
I checked the plain HTTP to HTTPS redirect but that would not work. What was happening is the a URL e.g. http://test.nik.com:8080 was being redirected to https://test.nik.com:8080 and that was not what was desired.
While searching for some hints I found the below iRule which worked, however I do not understand the logic.
+++++++++++++++++++++++++++++++++++++++++++++++++ when HTTP_REQUEST { HTTP::redirect https://[getfield [HTTP::host] ":" 1]:443[HTTP::uri] } +++++++++++++++++++++++++++++++++++++++++++++++++
Any help? :-)
Thanks, N.