Forum Discussion
hooleylist
Jun 16, 2006Cirrostratus
HTTP::uri refers to the entire URI, including the query string. So when you are setting the URI with HTTP::uri "/version02.webservices.portal/" or HTTP::uri "/version04.webservices.info/", you are overwriting the entire URI.
If you want to replace the instance of /portal/ with /version02.webservices.portal/ and leave the rest of the URI intact, you can use string map:
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/portal/" } {
HTTP::uri [string map { /portal/ /version02.webservices.portal/ } [HTTP::uri]]
pool SDS_Pool01
}
elseif { [HTTP::uri] starts_with "/info/" } {
HTTP::uri [string map { /info/ /version04.webservices.info/ } [HTTP::uri]]
pool SDS_Pool02
}
}
Aaron