Forum Discussion
hooleylist
Jun 13, 2012Cirrostratus
Hi Scott,
Nice work in getting that far. Here's an example which should do what you want in rewriting the internal hostname to an external hostname for response headers and content and the reverse for requests.
https://devcentral.f5.com/wiki/iRules.Proxy-Pass-Lite.ashx
Note that you can combine the two replacements in a string map command:
string map -nocase {internalservername.internaldomain.com:7004 rsa.tst.publicdomain.com internalservername.internaldomain.com rsa.tst.publicdomain.com} [HTTP::header value Location]]
And you can do this same using STREAM::expression:
https://devcentral.f5.com/wiki/iRules.stream__expression.ashx
STREAM::expression {@internalservername\.internaldomain\.com:7004@rsa.tst.publicdomain.com@ @internalservername\.internaldomain\.com@rsa.tst.publicdomain.com@}
or this might work too:
STREAM::expression {@internalservername\.internaldomain\.com(:7004)?@rsa.tst.publicdomain.com@}
Aaron