title: Create a Global IIS 7 rewrite rule
body: <p>I have wildcard A records (<code>*</code> and <code>*.*</code>) for my domain pointing to my dev machine. Basically, any subdomain that is not <code>www</code> is pointed to my dev machine (except the root).</p>
  
  <p>I never want my dev machine to be index or "followed" by search engines.</p>
  
  <p>What I would like to do is simple set up a <strong>global</strong> URL Rewrite rule like so:</p>
  
  <pre><code>&lt;rule name="Global robots.txt rewrite" stopProcessing="true"&gt;
      &lt;match url="^robots\.txt" ignoreCase="true" /&gt;
      &lt;action type="Rewrite" url="http://localhost/robots.txt" /&gt;
  &lt;/rule&gt;
  </code></pre>
  
  <p>The rule above will not work; though the following redirect rule does:</p>
  
  <pre><code>&lt;rule name="GLobal robots.txt redirect" stopProcessing="true"&gt;
      &lt;match url="^robots\.txt" ignoreCase="true" /&gt;
      &lt;conditions&gt;
          &lt;add input="{HTTP_HOST}" pattern="^localhost$" negate="true" /&gt;
      &lt;/conditions&gt;
      &lt;action type="Redirect" url="http://localhost/robots.txt" /&gt;
  &lt;/rule&gt;
  </code></pre>
  
  <p>.. but I'm not sure if 301 redirecting to a robots.txt actually works for the search engines.</p>
  
  <p>Any ideas on how to accomplish what I'm attempting?</p>