Password protection on website
- Started
- Last post
- 5 Responses
- graphikboi
I want to add a login facility on my website, which is password protected, what's the best way of going about this?
All i want to do is add some word documents that only people who know the password can have access to.
- UndoUndo0
htaccess
- graphikboi0
It just ain't working. Why are the easiest things so hard to do... grrrr.
I've saved a .htaccess and .htpassword onto my server in a folder called 'users', with these codes -
AuthName "Restricted Area"
AuthType Basic
AuthUserFile /users/.htpasswd
AuthGroupFile /dev/null
require valid-userand the passwords and encryption password on the password file. But once uploaded to site no box pops up to ask me for a username or password
I've read that I have to save the htaccess and htpasswd files in ASCII, and not binary format. But my notepad only allows me to save these in ANSI or unicode or utf-8. I'm saving it as ANSI, is this where I'm going wrong.
Please help.
- graphikboi0
anyone? :(
- UndoUndo0
they should be in the root of the directory which you need to protect. The protection will work for all sub directories within that directory and when you upload you can choose between ascii and binary. most ftp programs allow you to control this by specifying which file extension get uploaded in which format.
you wont have a problem saving from notepad. hope that helps