If you request a URL that doesn't exist and if 404.php exists as well then ErrorDocument directive works without any redirection, so verify if 404.php exists. Also check if you are allowed to set a custom error page. Some CMS catches requests to non existing URLs and show its own error page...