• I know how to create a .htaccess and what instructions to put in to it.
    Unfortunately I can not get the server to utilize the error documents. When someone encounters a “Forbidden” site it still just says Forbidden instead of calling my php file.
    I only get the error document redirect when I try to access the .htaccess file through the web.

    I created the .htaccess via “touch” and edited via “vi editor”
    I have 644 permissions on it.
    I have a .htaccess file siting in every directory including root, but they are not the same instructions.

    “#custom error docs
    ErrorDocument 404 /notfound.php
    ErrorDocument 403 /forbidden.php
    ErrorDocument 500 /error.php

    # protect the htaccess file
    <Files .htaccess>
    order allow,deny
    deny from all
    </Files>

    # disable the server signature
    ServerSignature Off

    # protect wpconfig.php
    <files wp-config.php>
    order allow,deny
    deny from all
    </files>

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

    Cheers!

  • The topic ‘.htaccess error document 403’ is closed to new replies.