Forum Discussion
Redirection based on URI on the request and inserting the URI path to the server
Hello Team, I'm working on request from the application team to categorize URI from the request and based on the URI the new URI path needs to be inserted on LB and it should routed to the server.
For example if the request from the client is as below: http://www.test.com/URI1/ and on LB when it routed the backend server it should be as http:/SERVER1/URI1/URI2/URI3.html
http://www.test.com/URI2/ and on LB when it routed the backend server it should be as http:/SERVER1/URI4/URI5/URI6.html
Could you please help me how I can achive this on LB?
Thanks a lot in advance for your help.
Regards, Thiyagu
- jaikumar_f5
Noctilucent
You can use the string map to achieve this,
when HTTP_REQUEST { if { [string tolower [HTTP::uri]] starts_with "/URI1" } { HTTP::uri [string map {"/URI1" "/URI1/URI2/URI3.html"} [HTTP::uri]] } if { [string tolower [HTTP::uri]] starts_with "/URI2" } { HTTP::uri [string map {"/URI2" "/URI4/URI5/URI6.html"} [HTTP::uri]] } }
- Abdessamad1
Cirrostratus
Hello,
You can use data groups to make it scalable.
But if you require full proxy rewriting, even in response pages, I suggest looking into the proxypass solution described here: https://devcentral.f5.com/codeshare/proxypass-v10-v11
regards.
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