Hi Cory,
Do you want the client to see the change in the address bar? If so, you can send the client a redirect to the correct hostname. One possible issue with this approach is that your cert for the HTTPS virtual server must be valid for abc.com and
www.abc.com in order to avoid the browser showing a mismatched hostname warning to the user.
when HTTP_REQUEST {
Check if requested host is not abc.com
if {[string tolower [HTTP::host]] ne "abc.com"}{
Check if the request was mode on port 443
switch [TCP::local_port] {
443 {
set proto https
}
default {
set proto http
}
}
Send the client a 302 redirect with the original URI preserved
HTTP::redirect "${proto}://abc.com[HTTP::uri]"
}
}
Here's a method to rewrite the host header before LTM proxies requests to the pool:
when HTTP_REQUEST {
Check if requested host is not abc.com
if {[string tolower [HTTP::host]] ne "abc.com"}{
Rewrite the host header
HTTP::header replace Host "abc.com"
}
}
Aaron