title: Redirect non www to www rule causing issue for files
body: <p>I have added this rule in my web.config to redirect non www URLs to www.</p>
  
  <pre><code> &lt;rule name="Redirect to WWW" stopProcessing="true"&gt;
            &lt;match url=".*" /&gt;
            &lt;conditions&gt;
              &lt;add input="{HTTP_HOST}" pattern="^example.com$" /&gt;
            &lt;/conditions&gt;
            &lt;action type="Redirect" url="http://www.example.com/{R:0}" redirectType="Permanent" /&gt;
          &lt;/rule&gt;
  </code></pre>
  
  <p>Although it is working fine for main site URL. Like if user types <a href="http://example.com" rel="nofollow">http://example.com</a> it redirects to <a href="http://www.example.com" rel="nofollow">http://www.example.com</a></p>
  
  <p>But for some URLs like </p>
  
  <p><a href="http://www.example.com/userfiles/abc.pdf" rel="nofollow">http://www.example.com/userfiles/abc.pdf</a></p>
  
  <p>it redirects to </p>
  
  <p><a href="http://www.www.example.com/userfiles/abc.pdf" rel="nofollow">http://www.www.example.com/userfiles/abc.pdf</a></p>
  
  <p>Here you can see 2 time www in URL.</p>