WordPress.org

Ready to get started?Download WordPress

Forums

404 Error Problem (12 posts)

  1. noshackles
    Member
    Posted 7 years ago #

    I changed a date on a post and created a 404 problem. I have created a 404.php file. I have modified the .htaccess file to "ErrorDocument 404 /blog/index.php?error=404". WordPress is installed in the subdirectory /blog. It appears that the 404 problem is specifically with the article that I changed. Original article link was http://www.thetimeandmoneygroup.com/blog/2006/10/26/the-commodities-bull-market-is-back This link cause the generic 404 error to occur. My preference is the custom 404 error that I created.
    thanks

  2. gavinholt
    Member
    Posted 7 years ago #

    Did you update your htaccess file with your current mod_rewrite information (since you are not using the index.php? method)? When I made a custom style I forgot to update it and I got 404 errors too.

  3. noshackles
    Member
    Posted 7 years ago #

    What do you mean? I created a 404.php file and I added "ErrorDocument 404 /blog/index.php?error=404" to the .htaccess file. Is there something else that I should do? thanks

  4. noshackles
    Member
    Posted 7 years ago #

    Here is my latest modification. Created a html for the error message "404Error.html". FTP'ed to my top directory. Changed htaccess file to ErrorDocument 404 http://www.thetimeandmoneygroup.com/404Error.html This does not work either.

  5. gavinholt
    Member
    Posted 7 years ago #

    Under options->permalinks, you have to cut and paste the textarea at the bottom into your htaccess file. More importantly you need to make sure your server can handle mod-rewrites (i think yours is okay). I did at custom link like so:

    http://www.gavinphotography.com/blog/2006-11-14-a-slideshow-of-judy-and-me/

    that is based on the name of the article and the date (custom since it doesn't create directories like yours). Since this is different, I had to cut and paste the new code into the htaccess file to pull this off.

  6. noshackles
    Member
    Posted 7 years ago #

    I am using GoDaddy as a host. Apparantely I have to set the error page at the ISP level. There is a option that I can set to use a custom ERROR page. Now whenever a file does not exist it uses the custom ERROR page specified. Except for in my blog directory. The blog directory contains the wordpress install. Apparantley something in my .htaccess file is causing a problem. If I remove the .htaccess file it finds my custom ERROR page. I am not sure what in this file would cause the problem, but the following is the content of my .htaccess file.

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]
    </IfModule>

    # END WordPress

  7. koeln
    Member
    Posted 7 years ago #

    I'll get an 404error on every link of your page?

  8. noshackles
    Member
    Posted 7 years ago #

    This is going from bad to worse. I reinstalled the .htaccess file and it looks like the site is working. At least my pages are showing. I still have the 404 error problem.

  9. gavinholt
    Member
    Posted 7 years ago #

    This might help I don't know if you are on a Virtual Dedicated like me or on an economy server, but the help files are pretty good.

  10. noshackles
    Member
    Posted 7 years ago #

    Does anyone see a problem with this .htaccess file? GoDaddy is claiming that it is overwriting the 404 file and causing my problems. This file was created months ago when I first installed WordPress. I asked GoDaddy if they could tell me what was wrong with the .htaccess file. There response was "Unfortunately, we are unable to support with the coding of the 404 page itself." Thanks

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]
    </IfModule>

    # END WordPress

  11. noshackles
    Member
    Posted 7 years ago #

    I finally resolved this problem by switching to Host Gator. GoDaddy's support was useless. Host Gator worked with my until it was isolated to Internet Explorer quirk.

    >>>>
    The code for the Error page must be at least 10Kb or it won't display properly in Internet Explorer. It's just one of IE's quirks. An easy workaround if you don't want your error page to ramble on & on is to simply put a bunch of other "stuff" within comment tags somewhere in your page. That way it won't show up when displayed in a browser. Comment tags are <!-- and --> with the <!-- placed before your comments and the --> placed after. Anything you have between these two tags will not be displayed in a browser. Example:

    <!-- This is a bunch of extra stuff I have to write in order to make the code of this page large enough for the custom error page to show up in Internet Explorer. Thanks Bill Gates!! blah blah blah blah and on and on until the page is long enough :-s -->

  12. hellioness
    Member
    Posted 7 years ago #

    I had a similar experience on godaddy.com, myself.

    As you already know, the problem with the 404 page on godaddy.com is not an htaccess problem but a problem with godaddy.com hosting. By trail and error, I discovered that Godaddy.com linux servers direct all server-level 404 errors to the page, "missing.html", in the root directory and completely ignores the "errorDocument 404 /index.php?error=404" command in .htaccess.

    Godaddy's support is so crappy, that the techs there don't even know this. When I called, I was told that htaccess was only on their windows servers!

    You need to customize "missing.html" to include a redirect to wordpress to have 404.php handle your 404 errors. You can even put php code in "missing.html" and it will run.

    However, IE's hijacking of my 404 traffic continues to be a problem. Even with "404.php" and "missing.html" bloated to be over 10k in size, IE still displays its own error page instead of mine most of the time.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags