I created a customize 404 error page (missing.html) and I add a line to .htaccess, so it looks like bellow:

AddType application/x-httpd-php4 .php .php3
AddType application/x-httpd-php4-source .phps
Action application/x-httpd-php4 /cgi-bin/php
Action application/x-httpd-php-source /cgi-bin/php
ErrorDocument 404 http://www.mysite.com/missing.html

The problem that I have is that is working only for html file (when I point to http://www.mysite.com/foo.html the redirection works but when I point to http://www.mysite.com/foo.php it doesn't and I get an ugly 500 'Internal Server error').

Note: the permissions on .htacces were set by
chmod 644 .htaccess