I am trying to do a redirection from one external address to another based on certian part of the URL, but need the remaining address to be left in place after the redirection. For example:
Thank you for the reply. It worked well..but my web developer doesn’t want a Browers redirect as I first thought.
What he wants is the BIPIP to act as a proxy for the customer. So in my example the clients browser doesn’t change, but the BIPIP will replace the xyxcustomer with customer1 for interanl purposes.
Seem like the replace would work..but haven’t found the correct syntax.
You can also set the URI with HTTP::uri (Click here). The URI sent to the pool will be modified--as opposed to issuing a redirect to the client. Here’s an example:
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/customer/"}{
pool WLS-Lab
} elseif { [HTTP::uri] starts_with "/xyzcustomer"}{
HTTP::uri [string map {/xyzcustomer/ /customer/} [HTTP::uri]]
}
}