Rewrite is on the serverside of the session, which is from the F5 to the backend server and it won't be visible to the clients on browsers. If you need a rewrite of the HOST header on the serverside of the session you can use below iRule
when HTTP_REQUEST {
set host [string tolower [HTTP::host]]
if {$host eq "abc.com"}{
HTTP::header replace "Host" "www.abc.com"
return
}
}
Redirect is a is a client-side request to have the web browser go to another URL. This means that the URL that you see in the browser will update to the new URL. If you are looking for a redirect, below is the iRule
when HTTP_REQUEST {
set host [string tolower [HTTP::host]]
if {$host eq "abc.com"}{
HTTP::respond 301 Location "https://www.abc.com[HTTP::uri]"
return
}
}