Nov 23, 2015
BIG-IP : irule syntax to construct url
F5 BIG-IP Virtual Edition v11.4.1 (Build 635.0) LTM on ESXi
Can anyone see a problem with syntax with this iRule :
when HTTP_REQUEST {
set host [HTTP::host]
if { not ([string tolower [HTTP::host]] starts_with "www.") } {
set host "www.[HTTP::host]"
}
HTTP::redirect "https://$host[HTTP::uri]"
}
This irule lives on an http vip.
The intention is to prepend "www." to the host ( if not already present ).