Forum Discussion
Kevin_Stewart
Aug 22, 2013Employee
You should write it exactly as it is in the reference document.
Note: The [getfield [HTTP::host] ":" 1] function above extracts the hostname from the host header and, if a non-standard port is specified, removes the port from the host header.
https://[getfield [HTTP::host] ":" 1][HTTP::uri]
By the way, there's already a built-in HTTP-to-HTTPS redirect iRule on the BIG-IP called "sys_https_redirect".