WordPress.org

Support

Support » Alpha/Beta » ErrorDocument

ErrorDocument

  • Little help…

    I’ve been trying to set a custom 404 error with ErrorDocument in my .htaccess. Every time I try to enter an incorrect address to a file or folder, the page reloads with my theme and just the post text.

    Here’s how my .htaccess file looks:

    ErrorDocument 404 /404.php

    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^test.theamells.net [NC]
    RewriteRule ^(.*)$ http://test.theamells.net%{REQUEST_URI} [R=301,L]

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

    # END WordPress

Viewing 2 replies - 1 through 2 (of 2 total)
  • Mark (podz)
    Support Maven

    @podz

    Can you not just specify those error docs through your cpanel ?

    Where is 404.php ?
    Try putting that code after the WordPress block ?

    schestowitz
    Member

    @schestowitz

    Have 404.shtml in your home directory to achieve custom error pages in Apache. You might need to point to such files though rather than do it the laborious way as you are attempting to do.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘ErrorDocument’ is closed to new replies.