Forum Discussion
Hello,
Do you want to rewrite only the redirection header or also the body ? If URLs sent by the web server are absolute (not relative) you will need to do it also for the body.
You can do it in many ways :
-
using the an "Rewrite Profile" check this link https://support.f5.com/kb/en-us/products/big-ip_ltm/manuals/product/ltm-implementations-11-4-0/21.html
-
using STREAM profile
-
using irule with stream enable / stream disable check the following code
when HTTP_REQUEST { HTTP::header remove "Accept-Encoding" STREAM::disable }
when HTTP_RESPONSE { if { [HTTP::is_redirect] }{ HTTP::header replace Location [string map -nocase [list {"dc1-cxn-01.domain.local" "myvoicemail.domain.com"} {"dc1-cxn-domain.local" "myvoicemail.domain.com"}] [HTTP::header Location]] } if { [HTTP::header value Content-Type] contains "text" || [HTTP::header value Content-Type] contains "xml" } { STREAM::expression [list {@dc1-cxn-01.domain.local@myvoicemail.domain.com@} {@dc1-cxn-domain.local@myvoicemail.domain.com@}] STREAM::enable } }
when STREAM_MATCHED { log local0. "Stream filter matched: [STREAM::match]" }
Hope it helps
Waiting for you feedback
Regards