I am working on simple CMS app. When the page which is requested isn’t found I want to show custom 404 with links and other information. In general I already have this functionality done but the custom 404 page is sent with 404 http response code. I can see it in firebug.
How can I generate custom 404 page with no HTTP error code. I want to send to the browser 200 OK not 404.
404 means file is not available. However the content is dynamic and there is a ‘file’ . It shows different content but I think it is wrong to show whole regular page with 404 http response code.
Also if you do not know how to help others do not try.
Well, if it’s just modifying the error page: You’ll find that in application.views.site/error.php. But I still think it’s wrong to change the response code. 404 might be known as “File not found” but it actually means that the webserver couldn’t find any content for display at the given URL.
He’s definitely right Either way, always throwing a 200 code in place of a 404 is a recipe for disaster If things go really badly, you may even get penalised by search engines by having what appear to be an unlimited amount of valid pages with duplicate data.