Problem with .htaccess 404 redirect

Hi,

I’m using the following code to do a 404 redirect…

ErrorDocument 404 index.php

BUT when I go to execute a nonexistent file, the browser simply outputs “index.php” — that’s it.

If I change the code to redirect to an external website like yahoo, that works just fine –

ErrorDocument 404 http://yahoo.com

But why isn’t my own page being executed?

Thanks.