Page is a not externally linkable
jdMorgan - 12:19 pm on Jul 28, 2009 (gmt 0)
Using a local URL-path instead of a canonical URL (http://x.y/path) is a violation of the HTTP protocol specification, but again, as Caterham stated above, *some* clients can accept this. So, the question is whether you want to risk you site's proper operation with all clients (browsers, search robots, etc.) by returning the wrong server code along with an invalid URL. This is not a good plan for success... Since you checked the headers on your 301 (which is fine for a 301, but not for a 4xx error response), go ahead and check your server response with your PHP 404 method. You'll see a 302, not a 404. Not good. Jim
Forcing the "Location" header in PHP will change the server response from your intended 404 to a 302 (redirect) as Caterham stated above.