Forum Discussion
PeteWhite
Feb 21, 2019Employee
Try this:
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] starts_with "www." } {
set host [ string map {'www.' ''} [HTTP::host] ]
HTTP::redirect "https://$host[HTTP::uri]"
} else {
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
}
}