Support » How-To and Troubleshooting » Errordocument 404 .htaccess not working

Errordocument 404 .htaccess not working

  • Hi Guys,

    apologize if you think this topic should be already clear, thank to the big amount of threat on the net, but I still can’t solve such issue.

    I have just installed a new WP instance on my server and have chosen to show permalink as /%category%/%post%/

    I have created several pages, and actually the home of my blog is a page not a post.

    It works great.

    Only when I try to generate a 404 error instead to be redirect to my error page, I have been redirected to the blog home where I can read the posts with a “DOCUMENT NOT FOUND” disclaimer.

    I have tried the following solution without success:

    * put the following string ErrorDocument 404 /errore-404/
    * also added a 404.php page
    * and also mixed the above mentioned techniques

    here my current .htaccess file

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


    # END WordPress
    ErrorDocument 404 /errore-404/

    Many thanks,

Viewing 6 replies - 1 through 6 (of 6 total)
  • esmi


    Forum Moderator

    Remove the 404 directive from your .htaccess file and then see Creating_an_Error_404_Page.

    Hi esmi,

    thank for replying.

    Actually I have already seen that post, in fact as I wrote I have already tried to remove the directive from my .htaccess and create a 404.php page.

    I have also tried to keep both but it doesn’t work.

    I need to understand why wordpress don’t follow the .htaccess directive.
    I wish to use the .htaccess file and maintain the control of the system.

    Anyone could tell me why WP bypass the htaccess file?



    Forum Moderator

    Because it generates a 404 page dynamically.

    Ok esmi but how I can block it?

    why if I create a 404.php page and I upload it on the server (alse removing the directive into my .htaccess file) it still doesn’t working?



    Forum Moderator

    Have you tried:

    – deactivating all plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    – switching to the Twenty Ten theme to rule out any theme-specific problems.

    resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.

    ok esmi,
    I have actually found I am a dumm :/ because the 404.php work fine on 20Theme and my previous theme had not a 404.php page.

    When I have put the 404.php page online the file was working fine but that is a work around for me.

    I wish to redirect user on another page using the .htaccess file but it seem impossible to do.

    Any idea?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Errordocument 404 .htaccess not working’ is closed to new replies.