I am using this rule to redirect to 404 while there is no such a file on the server
RewriteEngine on ErrorDocument 404 mydomain.com/404 RewriteCon