This question will work best with examples.
Say my web app is hosted at http://example.com/WebApp/
According to Microsoft, IIS will redirect if the trailing forward slash is missing. And this works as expected: a request sent to http://example.com/WebApp is redirected to http://example.com/WebApp/.
Now in my case, someone bookmarked the URL with an extra forward slash: http://example.com/WebApp//. This will load the web app as expected but now all the relative URLs are wrong. So if I call another app on the same domain, for example ../AnotherApp/SomePage.aspx, then it will try to load /WebApp/AnotherApp/SomePage.aspx instead of correctly loading /AnotherApp/SomePage.aspx.
How can I redirect http://example.com/WebApp// to http://example.com/WebApp/?
 
     
    