Create the following files:
Contents of
.htaccess:
Code:
AuthUserFile <PATH TO .HTPASSWD FILE>
AuthName "<whatever you want this area to be called>"
AuthType Basic
<Limit GET POST PUT>
require user <USERNAME>
</Limit>
You'll need to replace the following in the above:
- <PATH TO .HTPASSWD FILE>
- <whatever you want this area to be called>
- <USERNAME>
Contents of
.htpasswd
Code:
<USERNAME>:<encrypted password>
Would be best if you placed the above file somewhere that isn't publicly available.
You must replace the following in the above:
- <USERNAME> is replaced by the <USERNAME> that you have in the .htaccess file
- <encrypted password> is replaced by your password, encrypted
For the encrypted password, you'll have to find some sort of program to do this, or maybe your host's CP already has this feature.
For myself, if my host doesn't support this, I use Apache (since I already have it installed), so I'm not too sure how you'll get your encrypted passwords without it.