title: PHP on IIS7 - Receiving "Object Moved" html page instead of actually redirecting
body: <p>I'm learning PHP on my computer with IIS7.5 as the web server and am having a problem completing a 301 redirect correctly.</p>
  
  <p>The tutorials and forums all say to use the following:</p>
  
  <pre><code>Header('Location: ' . $url, true, 301);
  </code></pre>
  
  <p>OR</p>
  
  <pre><code>Header('Location: ' . $url);
  </code></pre>
  
  <p>In both cases, instead of actually redirecting, the browser (Chrome and Firefox) display this:</p>
  
  <pre><code>Object Moved
  
  This document may be found here
  </code></pre>
  
  <p>Using the FireFox web developer toolbar, I retrieved the page headers, which were:</p>
  
  <pre><code>Content-Type: text/html; charset=UTF-8
  Server: Microsoft-IIS/7.5
  X-Powered-By: PHP/5.3.5, ASP.NET
  Date: Mon, 21 Mar 2011 18:47:35 GMT
  Content-Length: 123
  
  301 Moved Permanently
  </code></pre>
  
  <p>Why is the page not redirecting? Displaying that page is kind of redundant and annoying for users.</p>