Before the crash, there were a few message regarding this, and a few solutions too I believe, but those have sinced disappeared. I'm still trying to find a solution that works, in order for me to have a full MySQL/PHP authentication system for all (not just .php) files under a certain directory. (without the use of .htaccess)
The common authentication system you see on the web is simple include("authenticate.php") at the top of all your files you want to secure. This however doesn't work for .ZIP, or .PDF files.
So I'm looking for a way to have Apache execute "authenticate.php" whenever a user requests a document from /private.
I have tried:
<Location /private>
ForceType application/x-httpd-php
DefaultType application/x-httpd-custom
Action application/x-httpd-custom "/authenticate.php3"
</Location>
which doesn't work unless they request exactly: "www.domain.com/private/"
If they try "www.domain.com/private/private.zip" it lets them through without executing authenticate.php3.
So I tried:
<Location /secure>
ForceType application/x-httpd-php
DefaultType application/x-httpd-custom
Action application/x-httpd-custom "/authenticate.php3"
</Location>
This seems to work perfect, the only difference? I don't have a /secure directory. I do however have a /private directory. So if a user requests "www.domain.com/secure/private.zip" it asks them to authenticate first. But the files real location is "www.domain.com/private/private.zip" so this only "masks" the problem, is not secure at all.
Does anyone know how I can get Apache to execute a .php file whenever someone tries accessing a document in the /private directory? Any document, not just .php or .htm files, but .zip, and .pdf as well? Thanks.