stream iRule not working

LTM v9.3.0

Ok, I hit a server going to https://report.joesplace.com/…

, which is available via public dns. After entering credentials, the server replies with a redirect to http://dspdsp1.joesplace.com:7778/...but, dspdsp1.joesplace.com is not available via public dns (works internally, just fine).

So, I set up an iRule and added the “stream” profile to the VIP and changed my http profile’s Chunking Response to “rechunk” and added the iRule to the VIP, as well. The iRule looks like this:

when HTTP_RESPONSE {

STREAM::enable

STREAM::expression “@dspdisp1.joesplace.com:7778@reports.joesplace.com@”

}

So, I am still getting the re-direct (using http watch to verify) sending me to dspdisp1.joesplace.com. Now, a 302 status should still qualify this as an HTTP_RESPONSE, so I do not understand why this would not work.

Any feed back (preferably a solution) would be greatly appreciated!

Stream profile acts on data only, not protocol headers.

With an http profile applied, to rewrite redirects you’ll need an iRule that looks specifically @ redirect responses & their headers:

when HTTP_RESPONSE {
  if { [HTTP::status] starts_with "3" } {
    set redirect [HTTP::header Location]
    string map {dspdisp1.joesplace.com:7778 reports.joesplace.com} $redirect
    HTTP::header replace Location $redirect
  }
}

/deb

Deb,

This works great!!!

Thanks