The Little Guy Posted May 14, 2007 Share Posted May 14, 2007 Im not 100% sure where I would go and post this question, so Ill post it here. How can I password protect a directory? Once it is password protected here is my question: 1. Will people still be able to look at the pictures/music/files in the directory if they know the exact URL (I want people to be able to do this)? Quote Link to comment Share on other sites More sharing options...
redbullmarky Posted May 14, 2007 Share Posted May 14, 2007 Google came up with this: http://www.colostate.edu/~ric/htpass.html as for your question - no they wont unless they enter a valid username/password. Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted May 14, 2007 Author Share Posted May 14, 2007 As for the first part, it looks like my host has a utility to password protect directories, where you fill out a form, and then after you submit, it creates the .htaccess file for you. The pictures/music/files are in subdirectories of the password protected directory, will they be able to work then? Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted May 14, 2007 Share Posted May 14, 2007 http://httpd.apache.org/docs/2.2/howto/auth.html (possibly replace 2.2 with 2.0 or 1.3 depending on your version) Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted May 14, 2007 Author Share Posted May 14, 2007 I cannot do that, I'm on a shared server. Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted May 15, 2007 Share Posted May 15, 2007 You can't use .htaccess files? Quote Link to comment Share on other sites More sharing options...
ober Posted May 15, 2007 Share Posted May 15, 2007 Shared servers do support .htaccess files unless your host has them turned off. Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted May 16, 2007 Author Share Posted May 16, 2007 I can use htaccess. I did however sorta get around this by makeing an index page, like so: http://tzfiles.com/users/ Quote Link to comment Share on other sites More sharing options...
ober Posted May 16, 2007 Share Posted May 16, 2007 Yeah... that's not really secure. Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted May 18, 2007 Author Share Posted May 18, 2007 It sounds just as secure as a password protected directory, to me. Basically I don't want users to see other users images, and if I password protect the users directory, it password protects all the images and files in the actual users files. Example of my structure: +--index.php | +--login.php | +--join.php | +--images | | | +--logo.gif | | | +--bg.gif | +--users | +--index.php | +--ryan | | | +--img1.jpg | | | +--img2.jpg | | | +--sound.mp3 | +--bob | | | +--img.gif | | | +--song.mp3 | +--tim | +--movie.mov | +--song.wma Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted May 19, 2007 Share Posted May 19, 2007 It's just a matter of knowing the filenames. With password protected directories they would have to enter a password whether they knew that or not. So it is not as secure as that. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.