For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

AlsDevC's avatar
AlsDevC
Icon for Altocumulus rankAltocumulus
Jan 30, 2019

Proxypass with LTM policy

Hello,

 

Can we make a proxypass with the ltm policy? I want to delete a pattern of a URL between the url called by the client and the url received by the server, for example: Client calls the URL https://mydomain.net/env1/index.php Serveur receive the URL https://mydomain.net/index.php

 

When I use the following condition: Operand: http-uri Event: request Selector: path Condition: contains Value: env1

 

And the following actions: Target: http-uri Event: request Action: replace Parameters - Name: Path Value: /

 

It replace all the path /env1/index.php with / so I want to keep /index.php.

 

How can I do that with LTM policy?

 

1 Reply

  • If there is a way to do that in LTM policies, I don't know of it. LTM policies don't typically support that level of granularity, but iRules do. Here is an iRule that I believe will solve your issue.

    when HTTP_REQUEST
    {
        if{[string tolower [HTTP::uri]] starts_with "/env1/index.php"} 
        {
            HTTP::uri "/index.php"
        }
    }