How do I add additional users to a password protected folder?
I’ve added one. Now I want to add more.
Thanks!
How do I add additional users to a password protected folder?
I’ve added one. Now I want to add more.
Thanks!
If the option doesn’t appear on 000webhost then you will have to do it the following way
Step one navigate to the folder you’ve already protected in File Manager
i.e. protectedfolder
Inside this folder you’ll see two files
Open up .htaccess and look for the line
Require user USERNAME
If you don’t see this you may see
Require valid-user
If you DO SEE Require valid-user
Then there is nothing else to do for this step.
If you see Require user USERNAME
you must change this to
Require valid-user
So now the password/username adding step.
Open up .htpasswd
It should contain
infinity:$apr1$JVmikviU$Dj.zHCxrX5ISMu81WSc9N.
For example
So we want to add more users
Head to this page: http://www.htaccesstools.com/htpasswd-generator/
Type in the desired username and password you want to add
It should give you something like newuser1:$apr1$z9F7mvrT$H1haYh4YVmyZFXsqeZs9Y0
Copy and paste it into the file on a NEW line
So the file should now have two lines if it had one before
infinity:$apr1$JVmikviU$Dj.zHCxrX5ISMu81WSc9N.
newuser1:$apr1$z9F7mvrT$H1haYh4YVmyZFXsqeZs9Y0
Save, exit, open a new tab and head to test it - open an incognito tab if it has still kept you logged in from old session.
This will allow you to test the new login details.