passing URI /path to server when loadbalancing

Hi

user targets https://url.domain.org/uat/login but when it gets to the end server it’s missing the /uat/login. The server requires other wise it pass back a 400 error. my setup/config is user → F5 ssl offload → Vserver → pool → node → server:10444. How do i get F5 to pass the /uat/login to the server.

if I go to the server direct using https://servername:10444 I get 400 error https://servername:10444/uat/login it works

if i add the following Irule as a test

when HTTP_REQUEST {

if { [HTTP::path] equals “/uat/login”} {

HTTP::redirect “https://servername:10444/uat/login”

}

}

it works

but in the browser shows https://servername:10444/uat/login instead of https://url.domain.org/uat/login

thanks in advance

HTTP::redirect is a shortcut for sending a 302 (Temporary Redirect) back to the client without involving the server that has the application. This is the reason why a different name is in the browser.

when HTTP_REQUEST {
 if { [HTTP::path] equals "/uat/login"} {
   node servername 10444
  }
 }

This will send the request on to the server.

I don’t really recommend node. I’d use a pool and the pool command

pool servername_pool

BIGIP won’t strip the URI part by default, unless there is iRule/ltm policy configured to do so.

There is no explicit need of sending the URI part to the server. You would need to investigate who is stripping it. Is it F5 or proxy/server on the path?

May be to start with, you can log in iRule to see if F5 is sending /uat/login to the server. Something like below

when HTTP_REQUEST{
log local0. "client --> F5:  [HTTP::method] https://[HTTP::host][HTTP::uri]"
}
 
when HTTP_REQUEST_SEND {
log local0. "F5 --> server:  [HTTP::method] https://[HTTP::host][HTTP::uri]"
}