In codeigniter, as you know, a page of the form: /class/function/ID
, where class is the controller name, function is the method within the controller, and ID is
show_404()
actually sends the proper headers for a search engine to register it as a 404 page (it sends 404 status).
Use a Firefox addon to check the headers received when calling show_404()
. You will see it sends the proper HTTP Status Code.
Check the default application/errors/error_404.php
. The first line is:
That line sets the HTTP Status as 404. It's all you need for the search engine to read your page as a 404 page.