Forum Discussion
hooleylist
Mar 09, 2012Cirrostratus
If you want to avoid redirecting IP addresses with www. prepended, you could use something like this:
when HTTP_REQUEST {
Check if Host header starts with a digit (is an IP address)
if {[string match {[0-9]*]} [HTTP::host]}{
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
} else {
HTTP::redirect "https://www.sample.com[HTTP::uri]"
}
}
Aaron