Deny access to directory files via browser with htaccess
<p>i want to deny access (from all non-logged in users) to all the files in a directory from the browser.</p>

<p>Only a logged in user can access his files in that folder. The file paths are stored in the database with the logged in user id, so that when the user logs in, he can view or download only his files.</p>

<p>So i dont want others (without logging in) to access the folder and files from the browser, and secondly, i want the users to be able to view only their files in the folder.</p>

<p>I think, Second thing i can do with some condition checks in php, but for the first one, can anyone tell me the htaccess rule to achieve ?</p>

<p>Thank you</p>
