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.
Here is my rule for removing trailing slashes:
<rule name="Remove trailing slash" stopProcessing="true">
<match url="(.*)/$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
<action type="Redirect" redirectType="Permanent" url="{R:1}" />
</rule>
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/.
Is there a work around for this?