We have an website on an hosting server which supports PHP/Apache (most web hostings support these)
How to protect some directory by password?
Create .htaccess file in the directory you want to protect:
Then create .htpasswd file using an online htpasswd generator like http://tools.dynamicdrive.com/password/
AuthName "restricted area"
example .htpasswd content:
and make it available at path which you set in .htaccess file (AuthUserFile), you need to enter absolute path to file!