I just dislike the idea of having to update such code for each new "valid" page. If your root directory isn't "safe," make a sub-directory to put your "valid" pages in - if it's in there, it's valid, if not, don't put it there.