Deny Access to directories from unauthorized users

Posted by JasonS on Server Fault See other posts from Server Fault or by JasonS
Published on 2010-02-02T10:10:53Z Indexed on 2012/07/11 3:18 UTC
Read the original article Hit count: 413

Filed under:

I am not being paid for this and I would like to know the quickest way to do the following. A former client has a page which only members can access. This page links to a number of galleries which he only wants members to access. The galleries are not protected by any kind of authentication.

What I assume is the quickest way to do this is to create a .htaccess file which only allow people to view the site when the come from a certain referrer. Would this work?

My current thinking is that I could use a php script to deploy a .htaccess file into each of the gallery directories. (There are around a 100 at the moment.)

I found this link which might be what I am after but to be honest I really don't get it. Is my thinking sound?

© Server Fault or respective owner

Related posts about .htaccess