Forum Moderators: mack

Message Too Old, No Replies

Write-Protecting a Directory

.htaccess password protect directory

         

Darwin

3:47 am on Dec 24, 2005 (gmt 0)

10+ Year Member



Hi,

I've been trying to password protect a directory for a while. Just from googling, the only information I found was to use .htaccess to prevent unauthorized viewing. But is there a way that I can make the files inside the directory publicly viewable, but require a password for anyone who wants to upload or change files?

Thanks in advance,

Darwin

wheel

4:46 am on Dec 24, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't know if you can do that through .htaccess. Probably, but it'd be a noodle scratcher to figure out how.

Set up a program that does the uploading, and require a password in the program. Then set the owner of the directory to the webserver. That should do it.

Darwin

4:50 am on Dec 24, 2005 (gmt 0)

10+ Year Member



The directory that I'm thinking about is one that my collegues can use Dreamweaver or frontpage to edit, but I don't want them to change anything outside the directory. Is there a way to do that?

Thanks,

Darwin