'How to path-based reverse proxy app service behind application gateway?

I have an application gateway configured with my wildcard certificate that I want to use to proxy myapp.azurewebsites.net (an ASP.NET core application) behind myapp.mywebsite.net/mypath.

I have an existing site running on myapp.mywebsite.net configured in the gateway, but I want just the /mypath route to point to the app service. How can I accomplish this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source