Web Hosting Reviews for Affiliate Marketers

Unlimited Shared hosting & Unlimited Disk Space from $5.95 - Dreamhost
Solid Managed VPS with 4 IP's from $60 - Liquid Web
Lightning Fast Dedicated Servers & 1GB RAM from $149 - Liquid Web
#1 Domain Registration with WHOIS Privacy - Just $9.95

This Dreamhost thread was started by emotioner on 2009-07-25 18:16:40:

Post Reply? Hi, I’d like to do something like this: I have a directory which I want to be password protected, recursively. The user who want to access this directory and its sub-directories and the files inside them will be prompted to enter user/pass; once they are authenticated, they are free to view all the files in it (recursively). I am currently using .htaccess to do this and what i found out is that .htaccess recursively affect directories below it (which is what I want) but at the meantime, requesting a file in another sub-directory (say, /protected_dir/anotherdir/index.html) yields the same authentication request even though the user has just passed the one in the entry dir (say, the one from /protected_dir/index.html, which is NOT what I want). So the user has to do this the second time if she chooses to view some files in a sub-directory. Is there a way to just have the user authenticated only the first time she requests a page (either the index.html or a file in a subdir) while still having all the sub-directories protected? Can this be done with just .htaccess or do I need to use some scripting to do that? Thanks!

Join in on the original post at the Dreamhost Forum, Sign up for Dreamhost or view our Dreamhost Review.

Related Web Host Reviews


Close
E-mail It