Hey everyone. Here's my problem. The web is CRAWLING with code to authenticate a user who is opening a specific file.

My problem: I want to use PHP to authenticate access to ANYTHING and EVERYTHING. I have a vritualhost on port 8029 and it will provide access to many various files that are only for my own personal access. If, for example, someone navigates to mywebsite:8029/secretfile.afile I want my PHP code to stop them and ask for a login.

I know this has a bit more to do with apache2 than PHP, but how can I configure my server to demand authentication by a PHP file when accessing anything in a virtualhost? (or any specific directory for that matter).

Thanks!