1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

404 pages aren't being served for incorrect urls ending in .php

Discussion in 'HTML, Graphics & Programming' started by Joobs, 29 Mar 2009.

  1. Joobs

    Gangster

    Joined: 25 Oct 2002

    Posts: 488

    Location: Brighton

    I have a weird problem on a clients server. If you type in an incorrect url which ends in .php it doesnt show a 404 page and returns a blank page with a 200 header.

    www.example.com/nothere/ - gives servers 404 page
    www.example.com/nothere.html - gives servers 404 page
    www.example.com/nothere.php - gives blank page with 200 header.

    Any ideas what is causing this? disabled all my htacess and i removed my CMS files...
     
  2. Pho

    Sgarrista

    Joined: 18 Oct 2002

    Posts: 9,097

    Location: Derbyshire

    IIS, Apache?
     
  3. probedb

    Wise Guy

    Joined: 24 Jun 2006

    Posts: 1,467

    Sounds like a server config issue.
     
  4. Joobs

    Gangster

    Joined: 25 Oct 2002

    Posts: 488

    Location: Brighton

    It's an apache server.

    I've contacted my clients host, but so far he hasn't been able to solve the issue.
     
  5. Whitman

    Associate

    Joined: 28 Nov 2005

    Posts: 62

    Location: Darlington

    I'm guessing it's fixed as it's showing me a 404 error.
     
  6. Joobs

    Gangster

    Joined: 25 Oct 2002

    Posts: 488

    Location: Brighton

    example.com isnt my website! i was using it as an example...
     
  7. Pho

    Sgarrista

    Joined: 18 Oct 2002

    Posts: 9,097

    Location: Derbyshire

    What happens if you specify an error document in .htaccss?

    PHP:
    ErrorDocument 404 http://www.example.com/error.php
    - for example.
     
  8. Joobs

    Gangster

    Joined: 25 Oct 2002

    Posts: 488

    Location: Brighton

    directories and html files that dont exist get forwarded to the error page specified (the url actually changes, I thought it just serves that file but the url should stay the same?)

    php files that dont exist still produce a blank white page
     
  9. Whitman

    Associate

    Joined: 28 Nov 2005

    Posts: 62

    Location: Darlington