If you look at a packet capture on the internal VIP you'll definitely see that the HTTP host header is changing. Despite that there may be other things causing the server to do what it's doing. At a minimum you should perform a client side HTTPwatch or Fiddler capture to see what the server is doing and how the client is reacting, as there a few ways to counteract the various behaviors. For example, if the server is just blindly sending a redirect to itself for a different URI, you can catch that and rewrite it:
when HTTP_RESPONSE {
if { [HTTP::header exists Location] } {
HTTP::header replace Location "name.company.com"
}
}
If the server is sending back an HTML page that has references to DOM objects using the absolute URL it knows (servername.domain.company.com), then you can catch those with a STREAM profile and iRule:
when HTTP_REQUEST {
HTTP::header remove Accept-Encoding
STREAM::disable
}
when HTTP_RESPONSE {
if { [HTTP::header Content-Type] contains "text" } {
STREAM::expression {@servername.domain.company.com@name.company.com@}
STREAM::enable
}
}
In both of these cases you're rewriting the URLs being presented to the client, which is most likely what you'll need if simply rewriting the inbound Host header isn't enough.