I'm learning PHP on my computer with IIS7.5 as the web server and am having a problem completing a 301 redirect correctly.
The tutorials and forums all say to use the following:
Header('Location: ' . $url, true, 301);
Header('Location: ' . $url);
This document may be found here
Content-Type: text/html; charset=UTF-8
X-Powered-By: PHP/5.3.5, ASP.NET
Date: Mon, 21 Mar 2011 18:47:35 GMT
301 Moved Permanently
I figured it out. The Location header must be an absolute path to auto-redirect. If it's a relative path it doesn't redirect.