Forum Discussion

JeromeM's avatar
JeromeM
Icon for Nimbostratus rankNimbostratus
Nov 25, 2020

Redirect request to backend without change in the URI

Hi,

 

I have a URL:

https://www.mydomain.com/generic/

 

and what we would like is to send all requests starting with /generic to the /clientX:

 

https://backend.server.com/clientX/

 

also any succeeding resource after /generic/ will be sent to /clientX/ example:

 

-- /generic/foo/bar --> /clientX/foo/bar

-- /generic/some/where --> /clientX/some/where

etc...

 

and as well.. keep the client URI stays in /generic/XXXXX

where XXXXX depends on the requested URI.. example:

 

https://www.mydomain.com/generic/ -- backend request goes to https://backend.server.com/clientX/ -- while client sees "https://www.mydomain.com/generic/" on his address bar example:

 

** https://www.mydomain.com/generic/foo/bar -- backend request goes to https://backend.server.com/clientX/foo/bar -- while client sees "https://www.mydomain.com/generic/foo/bar" on his address bar

 

Thank you,