Using the header() function as a 404 redirect in PHP Coding Help Posted September 30, 2008 Hi! I have a database driven site, but at the moment when a bad request is given, there is just a message saying "sorry no records found" I have changed it a bit so that there is a header() redirect, and my plan is to respond with 404 and serve a nice looking 404 page with a sitemap on it for my users. I can't seem to figure out how to do this though: header('HTTP/1.0 404 Not Found'); Does not work, and the page loads as normal, which is not what I want. Weirdly if I change to Location: type header redirect it works as i expect. If anybody could let me know why this isn't working, I would be very grateful!