Forum Discussion
Brendan_Newell_
Nimbostratus
Sep 12, 2005uri rewrite rule
If anyone can provide any assistance with the following then it would be much appreciated:
I have a customer who wants an irule to rewrite the uri so that when the user connects to the virtual server, they are passed through to the backend host with a slightly different uri.
eg.
user connects to http://www.virtualserver.com/test/index.html
user is directed to http://www.backendhost.com/sample/test/index.html
Many thanks!
6 Replies
- Colin_Walker_12Historic F5 AccountSo you're looking for something like this, I believe:
when HTTP_REQUEST { if{([HTTP::host] equals "virtualserver") and ([HTTP::uri] contains "test")} { HTTP::redirect "http://www.backendhost.com/sample[HTTP::uri]" } } -Colin
- Brian_Gupta_115
Nimbostratus
Colin, - Brendan_Newell_
Nimbostratus
Many thanks guys, we have actually solved this now - I didnt think anyone was reading this thread so I didnt update it. - You can use the HTTP::uri command to change the URI passed to the backend server.
- Thomas_Laubrock
Nimbostratus
Really! - hoolio
Cirrostratus
Hi Don,
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