Support » Alpha/Beta/RC » 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} !^ [NC]
    RewriteRule ^(.*)${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

    # END WordPress

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


    Support Maven

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

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

    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.