nginx redirect location to an external host, while keeping subpath, method and headers
I am trying to do a permanent redirect from a subpath location on a original server (https://my-server1.com/api/old/subpath
) to the root of an external host while keeping the subpath (https://my-server2.com/subpath
), the HTTP method (generally the request are POST requests) and the headers (the headers include authentication data).