OK, serve the file 0.php for URL requests for "/".
The way to send the 404 header is simple, and is shown in post #4147984 above.
You just send that header from within your index.php file, and follow it with:
<head><title>Page Not Found</title></head>
<body>Error. Page Not Found.</body>
but obviously with a lot more text than that very simple example.