Page is a not externally linkable
- Code, Content, and Presentation
-- PHP Server Side Scripting
---- 404 header but no error page


lucy24 - 10:49 pm on Aug 6, 2012 (gmt 0)


The 404 page won't "kick in" when you send a 404 header from a PHP script.
You have to INCLUDE() the error page HTML content for people to see.

Without the HEADER directive sending the 404 response, the status as seen in the response would be 200 OK because the request has already been fulfilled by an internal file.

Is that really what you want to do? (I mean "you" generically.) Show the user the content of the 404 page, as if they'd come by and requested "www.example.com/boilerplate/404.html" and duly received it, with attendant 200 response?

I have to ask this because it seems so contrary to what I've normally been told.


Thread source:: http://www.webmasterworld.com/php/4481909.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com