• I have a couple of blogs running on WordPress 2.5.1 installs. When I access a bogus URL at any of my sites, I get a 200 status code back from the server, instead of the desired 404 code. The custom 404 page that I created is displayed, but the response code from the server doesn’t match. Here are a few notes:

    1. I updated my theme’s 404.php file as specified here in the Codex. This made no change in what was returned.
    2. I’m not using a static page as my front page (I’m aware of bug 6539).

    Am I missing something obvious here? Why should I still be getting a 200 response when I explicitly modify the 404.php header calls?

Viewing 2 replies - 1 through 2 (of 2 total)
  • I got a 404 here:

    https://blog.borngeek.com/asdasasdasdasdasd

    GET /asdasasdasdasdasd HTTP/1.1
    Host: blog.borngeek.com
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    Accept-Language: en-us,en;q=0.5
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 30
    Connection: keep-alive
    
    HTTP/1.x 404 Not Found
    Date: Sun, 15 Jun 2008 02:28:04 GMT
    Server: Apache/2.0.61 (Unix) PHP/4.4.7 mod_ssl/2.0.61 OpenSSL/0.9.7e mod_fastcgi/2.4.2 Phusion_Passenger/1.9.0 DAV/2 SVN/1.4.2
    X-Powered-By: PHP/5.2.6
    X-Pingback: https://blog.borngeek.com/xmlrpc.php
    Expires: Wed, 11 Jan 1984 05:00:00 GMT
    Cache-Control: no-cache, must-revalidate, max-age=0
    Pragma: no-cache
    Last-Modified: Sun, 15 Jun 2008 02:28:05 GMT
    Vary: Accept-Encoding
    Content-Encoding: gzip
    Content-Length: 2637
    Keep-Alive: timeout=2, max=100
    Connection: Keep-Alive
    Content-Type: text/html; charset=UTF-8
    Thread Starter jgbishop

    (@jgbishop)

    I’ve seen the 404 returned in Firebug, but my Apache logs return 200 status codes for each bad URL. Any idea why Apache wouldn’t behave properly?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Bad URL sends 200 (not 404)’ is closed to new replies.