Forum Discussion
Minn_62043
Cirrostratus
Are trying to convert the links inside the HTTP response from www.abc.test.com to www.test.com again?
You can create a new stream profile to translate the domain names or use an iRule like this:
when HTTP_REQUEST {
set to_change 0
if { [HTTP::path] contains "/urltomonitor" } {
set to_change 1
}
STREAM::disable
}
when HTTP_RESPONSE {
if { $to_change == 1} {
set original "http://www.abc.test.com"
set replacement "http://www.test.com"
STREAM::expression "@$original@$replacement@"
STREAM::enable
}
}
You will need to modify the [HTTP::path] to match your url that contains redirection, and you still need to attach "stream" profile to your virtual server.
MSK_222682
Feb 04, 2016Nimbostratus
Hi Minn,
Thanks for your quick response.
I shall test this iRule in test infra. But can you help me understand how this above iRule (the commands) in it would be interpreted by BIGIP as I'm new to BIGIP technology and iRule code.
Also, whats the role of "stream" profile in this case.
Thanks again,
Sai