title: How does the rewrite works in web.config system.webserver
body: <p>I have an asp.net mvc 4 application and i have this rule in web.config</p>
  
  <pre><code>&lt;system.webServer&gt;
    &lt;rewrite&gt;
      &lt;rules&gt;
        &lt;rule name="Remove Virtual Directory"&gt;
        &lt;match url=".*" /&gt;
        &lt;action type="Rewrite" url="{R:0}" /&gt;
      &lt;/rule&gt;
    &lt;/rules&gt;
  &lt;/rewrite&gt;
  </code></pre>
  
  <p>I can't understand why and how this works. I use it because godaddy adds a virtual path in the url with the name of the folder the application is in.
  i.e. <code>example.com/foldername/index</code> becomes <code>example.com/index</code> </p>
  
  <p>So how does it finds the virual path by ".*" and removes it. And what {R:0} is?
  Thank you.</p>