Forum Discussion
Luis_Melendrez
Altostratus
Sep 21, 2017Rewrite response URL
We have build two Virtual Servers on LTM. When clients connect to first server the connection establishes successful and this server redirects the connection to secondary server with the internal URL...
Jad_Tabbara__J1
Cirrostratus
Sep 21, 2017Hi Luis
Could you add the following irule to your VS and check /var/log/ltm to see if its matching correctly...
Also add a stream profile to your VS.
when HTTP_REQUEST {
Remove the "Accept-Encoding" header
HTTP::header remove "Accept-Encoding"
Disable the stream filter for all requests
STREAM::disable
}
when HTTP_RESPONSE {
Check if response type is text
if { [HTTP::header value Content-Type] contains "text" || [HTTP::header value Content-Type] contains "xml" } {
Rewrite
STREAM::expression [list {@http:\@https:\@} {@internal-server-name:8008@myexternalserver.mycomp.com@}]
Enable the stream filter for this response only
STREAM::enable
}
}
when STREAM_MATCHED {
Log each match found by the stream filter
log local0. "Stream filter matched: [STREAM::match]"
}
Please give us a feedback
Regards
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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