g1smd - 9:05 pm on Jun 7, 2010 (gmt 0)
What did I miss?
Your script will return the numbered page requested. It will return the "index" page when no page number is specified. When a non-valid page number is requested, the script MUST return the HTTP 404 header, and an error message. This last point is VITAL.
... and ...
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.
So, you send the index page when "i" is blank, the correct numbered page if it exists, and the 404 HEADER and error message when a page does not exist.
Don't panic about having trouble understanding this stuff. It took me several years to get my head round it all.