title: add a slash at the end of website url using web.config re-write rule?
body: <p>I am working on a wordpress website. I want to add a slash at the end of website url if it is not exist into url.</p>
  
  <p>If any one request for this url : <code>www.mydomain.com/page/subpage</code>, it's pragmatically convert into <code>www.mydomain.com/page/subpage/</code>(append a slash at the end of the url). I want this because when user request for  <code>www.mydomain.com/page/subpage</code> url it's give me url not found error. </p>
  
  <p>For url re-writing i use following Rule in my <code>web.config</code> file: </p>
  
  <p>web.config rule:</p>
  
  <pre><code>&lt;rule name="Add trailing slash" stopProcessing="true"&gt;  
    &lt;match url="(.*[^/])$" /&gt;  
    &lt;conditions&gt;  
      &lt;add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /&gt;  
      &lt;add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /&gt;  
    &lt;/conditions&gt;  
    &lt;action type="Redirect" redirectType="Permanent" url="{R:1}/" /&gt;  
  &lt;/rule&gt;
  </code></pre>
  
  <p>Thanks in advance.</p>