Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 
Custom Alert Banner

ltm rewrite profile not accepting path

hyhy88
Nimbostratus
Nimbostratus

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 1

Paulius
MVP
MVP

@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]]
    }

}