Forum Discussion
jquinones82_469
May 06, 2011Nimbostratus
INOTES SSL OFF LOAD WHILE MASKING HOSTNAME OR URL PRESENTED NAME
Hello,
this is my scenario
I have a url i want to setup
nymail.mydomain.com which is a vip for INOTES while hosting SSL
Then I have 4 servers.
server1...
hooleylist
May 06, 2011Cirrostratus
So you basically want to rewrite server[0-9].mydomain.com to nymail.mydomain.com in the response headers and payloads?
Can you try this rule? You'll need to add the default, blank stream profile and a custom HTTP profile with response chunking set to rechunk for this to work.
http://devcentral.f5.com/Community/GroupDetails/tabid/1082223/asg/50/aft/1178837/showtab/groupforums/Default.aspx
Example which replaces server[0-9].mydomain.com with the originally requested host in response headers and content
Prevents server compression in responses
when HTTP_REQUEST {
Save the requested hostname for rewriting redirects
set host [HTTP::host]
Disable the stream filter for all requests
STREAM::disable
LTM does not uncompress response content, so if the server has compression enabled
and it cannot be disabled on the server, we can prevent the server from
sending a compressed response by removing the compression offerings from the client
HTTP::header remove "Accept-Encoding"
}
when HTTP_RESPONSE {
Check if server response is a redirect and contains the string pattern we want to replace
if { [HTTP::is_redirect] and [string match -nocase {http*://server[0-9].mydomain.com} [HTTP::header Location]]} {
Rewrite the host in redirects to the originally requested host from HTTP_REQUEST
HTTP::header replace location [string map -nocase "[URI::host [HTTP::header Location]] $host" [HTTP::header Location]]
}
Check if response type is text
if {[HTTP::header value Content-Type] contains "text"}{
Use a regex to replace server[0-9]\.mydomain\.com with the originally requested host
STREAM::expression "@server\[0-9\]\.mydomain\.com@$host@"
Enable the stream filter for this response only
STREAM::enable
}
}
Aaron
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects