This is a very simple question about why is this happening.
First of all, I've got a .net core 2.1 project, and I need 3 extra endpoints, so this is my code:
app.Map("/h1", handle1);
app.Map("/h1/h2", handle2);
app.Map("/h1/h3", handle3);
in the Configure method. handle1, handl2 and handle3 are custom methods to write different things on localhost:port/h1, localhost:port/h1/h2 and localhost:port/h1/h3.
However this is not working, because I get at localhost:port/h1/h2 the same result than for the other two, so localhost:port/h1 is correct but localhost:port/h1/h2 and localhost:port/h1/h3 are showing localhost:port/h1 which is not correct.
I have tried a few things, and this is kind of working:
app.Map("/h1", handle1);
app.Map("/h/h2", handle2);
app.Map("/h/h3", handle3);
questions are why? and how do I make it so localhost:port/h1 and localhost:port/h1/h2 and localhost:port/h1/h3 work?
Update:
I tried this and it works, but I don't get why
app.Map("/h1/h2", handle2);
app.Map("/h1/h3", handle3);
app.Map("/h1", handle1);