title: Removing the trailing slash from a nested application's virtual directory root in IIS
body: <p>I have a website with a nested application. Say the virtual directory is '/app' for the nested application.  When a request is made to www.mysite.com/app, a redirect is made to www.mysite.com/app/, probably because the virtual directory is not empty. I have a rule set up in the nested app's web.config to remove trailing slashes from all urls, but this does not affect the root path of the nested application. Is there a way (maybe a setting in IIS) to rewrite or redirect to the root without the trailing slash? I have tried many rewrite and redirect rules to no avail.</p>
  
  <p>Here is my rule for removing trailing slashes:</p>
  
  <pre><code>&lt;rule name="Remove trailing slash" stopProcessing="true"&gt;
    &lt;match url="(.*)/$" /&gt;
    &lt;conditions&gt;
      &lt;add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /&gt;
      &lt;add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /&gt;
    &lt;/conditions&gt;
    &lt;action type="Redirect" redirectType="Permanent" url="{R:1}" /&gt;
  &lt;/rule&gt;
  </code></pre>
  
  <p>Like I said, this works great, but this does NOT affect the root. There is a default.aspx page in the root that I want to load from www.mysite.com/app, NOT www.mysite.com/app/.</p>
  
  <p>Is there a work around for this?</p>