Jump to content

Recommended Posts

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)?

Link to comment
https://forums.phpfreaks.com/topic/51353-password-protect-a-directory/
Share on other sites

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?

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.