An HTTP::redirect will issue a 302 message to the user and physically reroute them to another URL? The pool command reroutes an internal flow to another pool member. Having an HTTP redirect and pool in the same context doesn’t work - they’re contradictory. Is “http://ilrwesapp1.jdadelivers.com/retail/” externally accessible?
Okay, so walk me through intended traffic flow. When a user connects to “http://retail-api-preview.jdadelivers.com/”, do you want them to get redirected to another site/URL at “http://ilrwesapp1.jdadelivers.com/retail/”, or simply select a specific pool member (retail-api-preview-Pool) and change the URI? What are you trying to accomplish?
For this:created a VIP, Named as: retail-api-preview.jdadelivers.com-HTTPS. associated HTTP Profile: retail-api-preview-HTTP(default http parameters), associated pool named: retail-api-preview-Pool.
Still not 100% clear. I’m going to make an assumption here, based both on the requirement to send to a specific pool and that the “ilrwesapp1.jdadelivers.com” URL is not published and accessible, that 1) this URL is internal, 2) you need to change the URI to “/retail” and send to a specific pool, and 3) quite possibly that you need to change the Host header. If that’s true, then the following might accomplish that for you.
when HTTP_REQUEST {
if { [HTTP::uri] equals "/" } {
HTTP::redirect "http://[HTTP::host]/retail"
}
HTTP::header replace Host "ilrwesapp1.jdadelivers.com"
}
If the user accesses the VIP without a specific URI, they’ll get redirected to “/retail”. The pool assignment is made at the VIP configuration level, so no need to assign it here. The Host header is replaced in the request.
when HTTP_REQUEST {
HTTP::redirect http://ilrwesapp1.jdadelivers.com/retail[HTTP::uri]
}
Then “http://ilrwesapp1.jdadelivers.com” must be an externally-accessible site. Is it a VIP on your BIG-IP? Where does the user go when you issue this redirect?