1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Non-Existant Page gets HTTP 200 and not HTTP 404: Why?

Discussion in 'Apache' started by jeff00seattle, Sep 20, 2009.

  1. #1
    I want to create a custom 404 page with:
    ErrorDocument 404 /errordocs/404.html
    Code (markup):
    In trying it out, I tried testing it with a non-existant page, http: //localhost/page_not_exist.html, but it did not go to /errordocs/404.html.

    So I checked out the access.log, and fake page_not_exist.html did not get the expected HTTP error 404 but instead got HTTP accepted 200, and then the localhost site got redirected to the default /index.php!

    127.0.0.1 - - "GET /page_not_exist.html HTTP/1.1" 200 66039
    127.0.0.1 - -  "GET /index.php?=PHPE9568F34... HTTP/1.1" 200 2524
    Code (markup):
    Why would this happen?

    Jeff in Seattle
     
    jeff00seattle, Sep 20, 2009 IP