g1smd - 6:34 am on Jun 7, 2010 (gmt 0)
It looks good so far. I assume
<?php HEADER "HTTP/1.1 404 Not Found"; ?>
I don't see how the code supplies a page for "example.com/" requests. That is when "i" is blank. You'll need to test for that.