Forum Discussion
Nicolas_Menant
Mar 18, 2008Employee
Hi,
You should find a lots of example about how to do so in the forum.
To do this job, you'll need to use STREAM commands that are used to replace a statement by another statement in the http response.
the HTTP::host command will allow you to update the host requested in the request
here is the syntax: Click here
Click here
Some example:
Click here
Click here
Click here
it would be something like this for the syntax:
when HTTP_REQUEST {
if { [HTTP::host] equals "api.oursite.com"} {
HTTP::header replace "Host" "someinternalurl"
}
}
when HTTP_RESPONSE {
STREAM::enable
STREAM::expression "@someinternalurl@api.oursite.com@"
}
my iRules won't do the job but it's more like a guidedline