I would like to start a discussion on what would be the best method to approach a problem that seems simple, but I am not aware of the best approach.
I have a system that allows an administator to control access to a members only area. It uses basic database authorization and control.
The problem is that there is a PDF in the section that I want to restrict to the members only. If I don't htaccess protect the directory that the pdf is in then it is vulnerable to direct access because the php security for normal pages won't protect a pdf file the same way. So to get around the problem I put up a page (members only view) that shows the username and password to put into the htaccess prompt to get access to the file.
My question is, is this an acceptable method of providing security for pdf's within a members only area?
Michael