Forum Discussion
Rewrite 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 which external clients don't know what this is. My secondary external server should look something like https://myexternalserver.mycomp.com/.
Is there a way to re-write server's response from
to https://myexternalserver.mycomp.com/etc/etc2/etc3
so my external clients can access this resource?
- Jad_Tabbara__J1
Cirrostratus
Hi 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
- Stanislas_Piro2
Cumulonimbus
Hi,
Use rewrite profile with rule:
- client url : https://myexternalserver.mycomp.com/
- server url :
- direction : response
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