For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

wyuen_99269's avatar
wyuen_99269
Icon for Altostratus rankAltostratus
Apr 13, 2015

How to mask the content page that redirect plus keep the header entered that entered by the user

The following irule does the following :

1 ) User enter the URL : http://www.supportourtroopscanada.com 2 ) Site redirect to http://www.canex.ca 3 ) Header in Address Bar stays as www.supportourcanada.com ( that what I want ) 4 ) Trying the mask the content of the page with any "www.canex.ca" to "www.supportourtroopscanada.com" which does not work.

Here is IRULE :

when HTTP_REQUEST {

Remove the Accept-Encoding header from requests so that the server does not compress responses
HTTP::header remove Accept-Encoding

 Disable the STREAM profile for request traffic
STREAM::disable

set static::host [HTTP::host]

HTTP::header replace Host "www.canex.ca"

}

when HTTP_RESPONSE {

 For any text-based response enable a STREAM mapping to replace specific values
 To use this, enable an empty STREAM profile to the virtual server
if { [HTTP::header Content-Type] contains "text" } {
    STREAM::expression {@www.supportourtroopscanada.com@www.canex.ca@}
    STREAM::enable
}

}

Please advise.