Forum Discussion
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 responsesHTTP::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.
2 Replies
- samstep
Cirrocumulus
I suggest you check out the ProxyPass irule: https://devcentral.f5.com/wiki/iRules.ProxyPassV10.ashx
- cjunior
Nacreous
Maybe you could do it with a HTTP rewrite profile (rewrite-uri-translation) for request and response. []
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com