Forum Discussion
Brett_10751
Sep 28, 2011Nimbostratus
Modify URI without redirecting then send to pool
We have a single virtual server.
The idea is when users hit this single virtual server (single domain name) they will be sent to different pools based on uri
Example:
doma...
Michael_Yates
Sep 28, 2011Nimbostratus
Hi Brett,
Yes you can do what you are needing to do with a combination of iRule abilities or an iRule and the built in Virtual Server configurations.
Incoming URI Modification:
This can be handled with a string map replace on the incoming URL. The URL will remain unchanged in the Client Browser, but the request to the server modified. This is a one way URI Masking technique. You can see a really good example here:
http://devcentral.f5.com/Community/GroupDetails/tabid/1082223/asg/1/aft/12381/showtab/groupforums/Default.aspx
URL Correction on HTTP_RESPONSE that will correct the content for the next Client Request:
The Hyperlinks on your website probably have the URL that you want to hide from the client and this can be corrected in a Stream Profile.
The Stream Profile is configurable through the Management GUI, or via an iRule. For the Management GUI you can find it under (in v10.x.x):
Local Traffic -> Profiles -> Other -> Stream
It is as simple as inputting what you want it to look for and then what you want it to replace it with.
Stream Profile with an iRule requires the use of a the STREAM::expression command:
http://devcentral.f5.com/wiki/iRules.STREAM__expression.ashx
A modified / custom HTTP Profile that specifically has the "Response Chunking" option set to "Rechunk" and a blank stream profile (at the location above, create a custom stream profile that has the "Source" and "Target" options blank.
The GUI configured Stream Profile is easy to configure, but in my opinion, doing it via an iRule is much easier to manage if you are going to be doing multiple Find and Replace actions on a single Virtual Server.
Hope this helps.
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