Jump to content

Recommended Posts

Posted

Several questions:

 

1. If I password protect a directory, does this force users who try to access any subdirectory or file under this directory to log in? E.g. if I password protect www.mysite.com/protected/, will someone who enters the http:://www.mysite.com/protected/subdir/subsubdir/page.html be asked for their password, or not?

 

2. If there are two or more password protected directories in the path, what happens? E.g. if in the above path 'subsubdir' is also protected, what will the user be asked to do?

 

3. If I create a user fred.smith who can access the directory 'protected', and I also create a user fred.smith who can access 'subsubdir', are these two users the same, or are they completely separate?

 

4. If I change the password of the first fred.smith, does the password for the second fred.smith change too, or do I have to change that separately?

 

5. Can I programmatically (e.g. in a php page) create users who can access directories, and change their passwords?

 

6. Or is there any other way of allowing users who want to access a password protected directory to request an account, and of allowing users to change their own passwords?

 

7. How do I control what happens when a user fails to log in correctly (e.g. so I can allow them to request an account, or send them an e-mail reminding them of their password etc.)?

 

Thanks for your help - Rowan

Posted

Hello Sylvest,

 

1) Correct, they will be forced to ask for a username and password

 

2) My experience is the last protected folder in the chain is the one which is asked for authenication. However, if the folder calls a file from one before, it will pop up and ask for that authentication too. However, if this fails, the page will still load, just without what ever it was looking for.

 

3) I would heavily advise about having two usernames being the same in any authenication system. However, they are completley seperate as long as the name given to the protecting folder is different

 

4) Change each one individually

 

5) No, as the authetication is done via php session and there is no database to write too. If you want to do this, I would consider looking at the many various cms packages etc out there which would do this job

 

6) No, See point 5

 

7) You can, if the website is geared to one intrest so to speak, create a custom error page for authenication which will make them request an account.

 

Cheers

 

Jimuni

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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...