Hi Abeny,
A redirect will result in a 301 or 302 status response being sent to the client with a Location header value that indicates to the client where to make a new GET request. The browser address bar will update to show the change in the URL to the Location header value. Rewriting the host and/or URI will be transparent to the client--the change is made before the request is sent to the pool member.
Here is an example of a redirect:
when HTTP_REQUEST {
Redirect all requests to http://www.yahoo.com/search?q=$host
where $host is the originally requested hostname
HTTP::respond 302 noserver Location "http://www.yahoo.com/search?q=[HTTP::host]"
}
And an example for rewriting the host header and URI:
when HTTP_REQUEST {
Rewrite the hsot header to www.yahoo.com and the
uri to /search?q=$host where $host is the originally requested hostname
HTTP::header replace "www.yahoo.com"
HTTP::uri "/search?q=[HTTP::host]"
}
Aaron