In the future, if you could post these types of questions to the iRules forum, then, you'll likey get a quicker response.
There are two types if url rewrites you can do with iRules. First a HTTP::redirect will issue a redirect HTTP response back to the browser. The browser will then in turn change the address bar and issue a new request. The following example will look for host requests to aaa.myzone.com and will issue a redirect to the browser keeping the URI intact but changing the host.
when HTTP_REQUEST {
switch [HTTP::host] {
"aaa.myzone.com" {
HTTP::redirect "http://bbb.mynewzone.com[HTTP::uri]"
}
}
}
Or, if you don't want to change the address bar, you can just modify the host value, you can do so with the following code
when HTTP_REQUEST {
switch [HTTP::host] {
"aaa.myzone.com" {
HTTP::header replace "Host" "bbb.mynewzone.com"
}
}
}
Hope this helps...
-Joe