Forum Discussion

hyhy88's avatar
hyhy88
Icon for Nimbostratus rankNimbostratus
Nov 17, 2023

ltm rewrite profile not accepting path

Hi All,

Im new here.

I would like to seek advice on setting up rewrite profiles on LTM.
Currently i got this url https://example.bcd.com/apps/ that in backend i forward the traffic to the pool.

in the pool got 2 nodes with port 8080 running.

using nginx, i can proxy pass the traffic to https://example.bcd.com:8080/devapp/

how to get similar results in ltm?

 

already tried creating rewrite uri, but it only accepts full url instead of path only.


1 Reply

  • hyhy88 On the LTM you do not have to specify the port in the host section of the URL because it automatically sorts that. The following should be the iRule that is need to change the URI.

    when HTTP_REQUEST priority 500 {
    
        set URI [string tolower [HTTP::uri]]
    
        if {${URI} eq "/apps/"} {
            HTTP::uri [string map {"/apps/" "/devapp/"}[HTTP::uri]]
        }
    
    }