I have a set of public API endpoints hosted with our main web app. They are all under the path /api/v1/. I want to move all API calls to a different domain, and keep the original path.
For example, a call to:
https://mydoamin.com/api/v1/client/123
Should be redirected to:
https://api.mydomain.com/api/v1/client/123
What's the best way to do this with ASP.NET (Framework 4.8) and IIS?
Note that I have other paths that I don't want to be redirected, like /api/orders. The URL needs to have /api/v1/.
Thanks is advance.