title: How to redirect extra forward slash in URL with IIS
body: <p>This question will work best with examples.</p>
  
  <p>Say my web app is hosted at <code>http://example.com/WebApp/</code></p>
  
  <p><a href="http://support.microsoft.com/kb/298408">According to Microsoft</a>, IIS will redirect if the trailing forward slash is missing. And this works as expected: a request sent to <code>http://example.com/WebApp</code> is redirected to <code>http://example.com/WebApp/</code>.</p>
  
  <p>Now in my case, someone bookmarked the URL with an <em>extra</em> forward slash: <code>http://example.com/WebApp//</code>. 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 <code>../AnotherApp/SomePage.aspx</code>, then it will try to load <code>/WebApp/AnotherApp/SomePage.aspx</code> instead of correctly loading <code>/AnotherApp/SomePage.aspx</code>.</p>
  
  <p>How can I redirect <code>http://example.com/WebApp//</code> to <code>http://example.com/WebApp/</code>?</p>