Forum Discussion
Deb_Allen_18
May 02, 2007Historic F5 Account
Not to negate Kirk's suggestion, but I'm always a fan of the simplest solution possible, so I'll just point out that many customers facing this dilemma can probably get away with using a couple of built-in features instead of an iRule.
If all you need to do is rewrite the redirect sent by your pool members to reference the virtual server hostname instead of their own, set "Redirect Rewrite" to "All" in the HTTP profile (or "Matching" if some redirects will be to other hostnames).
If you also need to re-write any self-referencing outbound links imbedded by pool members in the response pages to reference the virtual server hostname instead, create and apply a stream profile with the following values:
source:
target: @node1.domain.com@vs.domain.com@ @node2.domain.com@vs.domain.com@ @node3.domain.com@vs.domain.com@@
which will perform a single pass replacement looking for the first value in each pair, replacing with the 2nd.If you need more than that, an iRule would most likely be the best solution.
/deb