Forum Discussion
URI transformation
I would like to have iRule select a pool and transform the URI similar to shown below:
Client enters:
https://www.test.com/alpha
For communication between LTM and server, I need the URI to be transformed several directories down:
https://nodeip/random/deep/level/directory/structure
So, final result is the client only sees https://www.test.com/alpha, but the entire URI /random/deep/level/directory/structure is sent to the node.
5 Replies
- Yann_Desmarest_
Nacreous
Hello,
You can use an irule to translate the client URI to the server using the following command : HTTP::uri
You can also use an LTM policy to do the job
- DaleLeBlanc_140
Nimbostratus
Thanks Yann. Can you provide syntax for the iRule translated URI?
Hello,
You can use an irule to translate the client URI to the server using the following command : HTTP::uri
You can also use an LTM policy to do the job
- DaleLeBlanc_140
Nimbostratus
Thanks Yann. Can you provide syntax for the iRule translated URI?
- Samir_Jha_52506
Noctilucent
Hi Dale,
Make sure you apply Stream profile on VIP before applying below iRule.
when HTTP_REQUEST { HTTP::header remove Accept-Encoding STREAM::disable } when HTTP_RESPONSE { Disable the stream filter for server responses STREAM::disable Enable the stream filter for text responses only if {[HTTP::header value Content-Type] contains "text"}{ Replace 'old_text' with 'new_text' STREAM::expression {@https://nodeip/random/deep/level/directory/structure@https://www.test.com/alpha@} Enable the stream filter for this response only STREAM::enable } }For reference please visit this link
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