Securing folder using Apache and PHP
Posted on 2005-04-15
I have login system writen on PHP and uses MySQL database. On the server I have folder which contains html files and pictures, like:
Every user have a number that is stored in his MySQL, and I want to prohibit folder from being browsed by every body exept that user only can see files which are starts from his number. For example user "yo" have a number "3" stored in his database. I want hi m to be able only see files 3.html & 3.jpg and denied access from his to view any other files!
Is is possible to do something like this using apache and php security. By the way I was using session auth. If needed .html files can be changed to .php and some security can be added to protect them from being viwed, but how can I protect the pictures???