Do you actually want to rewrite the Host header or send a 302 redirect back to the client with the updated URL?
If you remove the switch command from your rule, you would successfully replace the Host header in the request sent to the web servers with the updated host value.
If you wanted to redirect clients to the new host with the same URI, you can use this:
when HTTP_REQUEST {
if { [HTTP::host] equals "www1.company.com"} {
HTTP::redirect http://www.company.com[HTTP::uri]
}
}
Note that you should change http:// to https:// in the redirect if your VIP is using client SSL.
Aaron