Custom 404 error page issues

Discussion in 'Site & Server Administration' started by thatdaveguy, Nov 26, 2007.

  1. #1
    This is the strangest issue. I can't seem to set the error pages for my website.

    I followed this guide:
    http://codex.wordpress.org/Creating_an_Error_404_Page

    My website is in my signature.

    And I created these lines in .htaccess and created the respective files manually

    #custom error docs
    ErrorDocument 404 /dailycute/index.php?error=404

    These files work as intended if I directly input them into my browser.

    however, something is redirecting 404's directly to my home page. there's nothing else in .htaccess doing this. it's ignoring the .htaccess instructions which is strange

    even when i use cPanel's built in error page tool, my website ignores it and takes me back to the home page.

    any ideas?
     
    thatdaveguy, Nov 26, 2007 IP
  2. mcfox

    mcfox Wind Maker

    Messages:
    7,526
    Likes Received:
    716
    Best Answers:
    0
    Trophy Points:
    360
    #2
    Do you actually have a page called 404.php? That's what you're telling the server to look for. If it doesn't exist then the default is to go to the index.php page.
     
    mcfox, Nov 26, 2007 IP
  3. thatdaveguy

    thatdaveguy Peon

    Messages:
    232
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #3
    yes i do.

    it's in the wordpress theme directory, as per wordpress' instructions

    i also made one in public_html
     
    thatdaveguy, Nov 26, 2007 IP
  4. mcfox

    mcfox Wind Maker

    Messages:
    7,526
    Likes Received:
    716
    Best Answers:
    0
    Trophy Points:
    360
    #4
    Problem is you are telling the server to look in the folder, dailycute, for the error page
    so when it can't find it there it defaults to the index page.

    Try this, it should work if you have the error page in the root (public_html)
    Or you can specify where it should look. I use a folder specifically for error pages so it's always the same whatever site I use .htaccess 404 custom error pages. Something like this:
     
    mcfox, Nov 26, 2007 IP
  5. thatdaveguy

    thatdaveguy Peon

    Messages:
    232
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #5
    yes i know, my wordpress installation is located in /dailycute/

    that's how wordpress says to do it with a wordpress site not in the root :(

    i tried your way as well, it doesnt work either.
     
    thatdaveguy, Nov 26, 2007 IP
  6. mcfox

    mcfox Wind Maker

    Messages:
    7,526
    Likes Received:
    716
    Best Answers:
    0
    Trophy Points:
    360
    #6
    Is dailycute an add-on domain or something? You may need to specify the folder like so:
    Obviously making sure that whichever folder you specify has a copy of 404.php in it.
     
    mcfox, Nov 26, 2007 IP
  7. thatdaveguy

    thatdaveguy Peon

    Messages:
    232
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #7
    still no go. i'm so baffled. i appreciate the help though, thank you.
     
    thatdaveguy, Nov 26, 2007 IP