# Selecting another pool from HTTP\_RESPONSE

**URL:** <https://community.f5.com/t/selecting-another-pool-from-http-response/10200>\
**Category:** Technical Forums\
**Tags:** dev, irules, devops, application-delivery\
**Created:** [March 1, 2006, 3:24pm UTC](https://community.f5.com/t/selecting-another-pool-from-http-response/10200 "2006-03-01T15:24:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Simon\_Knox\_1115](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@Simon\_Knox\_1115](https://community.f5.com/u/Simon_Knox_1115)\
**Post date:** [March 1, 2006, 3:24pm UTC](https://community.f5.com/t/selecting-another-pool-from-http-response/10200/1 "2006-03-01T15:24:34Z")

</div>

Hello,

Yet another question that I’m hoping for some advise on…

I want to send a HTTP request to a server which authenticates the request and replies with a HTTP header called access.

What I want to do is on the HTTP\_RESPONSE is query this header and dependeing on its value redirect to another web application. Now this works if I use HTTP::redirect but I would like to change reselect another pool and send the request straight there rather than do a redirect.

My attempts are shown in the following code:

```tcl
when HTTP_RESPONSE {
   set access [HTTP::header ACCESS]
   if { $access == "Granted" } {
      HTTP::header replace "host" "www.application.com"
      pool wwwDEFAULT
   } else {
      HTTP::redirect "http://support.application.com"
   }
}

```

This doesn’t seem to respond with a blank page if the $access equals ‘Granted’ if it equals anything else the HTTP::redirect kicks in as expected.

So is there away to send the traffic back to servers on HTTP\_RESPOSE or am I going to have to use redirects?

Cheers

Simon

---

<div class="post-metadata">

**Author:** ![Colin\_Walker\_12](https://avatars.discourse-cdn.com/v4/letter/c/a88e4f/32.png) [@Colin\_Walker\_12](https://community.f5.com/u/Colin_Walker_12)\
**Post date:** [March 2, 2006, 3:21pm UTC](https://community.f5.com/t/selecting-another-pool-from-http-response/10200/2 "2006-03-02T15:21:36Z")

</div>

I’d recommend looking into using the HTTP::retry command. This command allows you to actually re-send the request to the server.

Combine that with the HTTP::request command that will give you the original request, in case you want to modfy it, and you can send just about any request you want, to just about any server you want with the HTTP::retry command.

-Colin

---

<div class="post-metadata">

**Author:** ![unRuleY\_95363](https://avatars.discourse-cdn.com/v4/letter/u/58f4c7/32.png) [@unRuleY\_95363](https://community.f5.com/u/unRuleY_95363)\
**Post date:** [March 3, 2006, 10:59pm UTC](https://community.f5.com/t/selecting-another-pool-from-http-response/10200/3 "2006-03-03T22:59:28Z")

</div>

Yep, the HTTP::retry command was added in 9.2.
