Add Trailing Slash - Web.config

Add Trailing Slash - Web.config

code snippet

web.config
<system.webServer>
        <rewrite>
            <rules>
                <remove name="Add trailing slash" />
                <rule name="Add trailing slash" stopProcessing="true">
                <match url="(.*[^/])$" />
                   <conditions>
                       <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                       <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                      <add input="{REQUEST_FILENAME}" pattern="(.*?)\.html$" negate="true" />
                      <add input="{REQUEST_FILENAME}" pattern="(.*?)\.aspx$" negate="true" />
                   </conditions>
                   <action type="Redirect" redirectType="Permanent" url="{R:1}/" />
                </rule>
            </rules>
        </rewrite>
</system.webServer>

"The measure of who we are is what we do with what we have"

Contact me!

Have questions? Feel free to use the form or send me an email with any questions.

I will be responsive to your requests and your questions.