[resolved] http headers for 404s (3 posts)

  1. alastc
    Posted 11 years ago #

    When I get a 404 in a worpress (1.5) controlled page, WordPress gives the user the 404 template page, which is good, but it servers it as a 301 - moved permenetly.

    This means I can't track 404s from the logs or with a auto-magical script (checkbot).

    Is there some php I can include in the 404 template that would send the correct http header?

  2. alastc
    Posted 9 years ago #

    This still seems to affect WordPress 2, and it makes it more difficult to regerster with Google.

    Any ideas on how to fix this?


  3. alastc
    Posted 9 years ago #

    Adding this to the top of the 404 template seems to work:
    <?php header("HTTP/1.0 404 Not Found"); ?>

    Are there any problems with this approach?

Topic Closed

This topic has been closed to new replies.

About this Topic