| Now, Let's learn how to protect
your first web directory step by step.
Suppose you want to protect all files under web directory http://www.html-password.net/example/.
Step 1, Define User/password List:
- Click
"Add User" button, Input user "Tom", password
"TTTTTT", then click "OK" button.
- Add Jack/JJJJJJ, Kevin/KKKKKK in this way also.
Step 2, Settings:
- Input "/" in the "Remote FTP path to the
.htpasswd file" text box.
- Input "/home/htmlpass/" in the "FULL HOST
path to your ftp root directory" text box.
- Input "Members Area Only" in the "Text shows
in the password dialog" text box.
Step3, Create .htaccess and .htpasswd files:
- Click "Generate .htaccess and .htpasswd files"
button.
- Click "Preview .htaccess file" and "Preview
.htpasswd file" to view the .htaccess file and .htpasswd
file.
Last Step, Export Password Files:
In this step, we directly upload .htaccess
file and .htpasswd file to our web server.
- Input ftp host name: ftp.html-password.net.
- Input valid ftp user name and password.
- Input full server path of the web directory to be password
protected: /public_html/example/.
- Click
"Upload Now!" button to upload .htaccess file and
.htpasswd file to web server.
Now click http://www.html-password.net/example/
to test this example.
If you want to save .htaccess and .htpasswd files to local
disk, you can select "Save to local disk", choose
local directory, and then click "Save Now!" button. |