Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

We have ASP.NET application that has sub-folder with .aspx pages and separate web.config file in it. The .aspx pages in that sub-folder behave as separate site. In the web.config file at application level, I set the rule that removing trailing slashes:

<rewrite>
    <rules>
        <rule name="RemoveTrailingSlashRule1" 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>
    </rules>
</rewrite>

I expect this rule will propagate downward to sub-folder as well.

To access the site in sub-folder we should type:

http://concert.local/elki/

and get it without trailing slash as:

http://concert.local/elki

But, the trailing slash remains.

The web.config file in sub-folder looks as following:

<configuration>
  <system.webServer>
    <defaultDocument>
      <files>
        <add value="Sections.aspx" />
      </files>
    </defaultDocument>
  </system.webServer>
</configuration>
share|improve this question
add comment

migrated from stackoverflow.com Oct 18 '13 at 2:01

This question came from our site for professional and enthusiast programmers.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.