Q |
How
to configure a directory protection? |
A |
Before
the explanation, we need to remind you that directory protection
is an advanced fucntion. It is only recommended for advanced
users. If you are beginner, please consult more information
about directory protection from reference books. |
| |
Here
are the steps: (Important: Please contact us for your site number (sitex) first if you don't know.) |
| |
1)
Create a file called htaccess.txt by Notepad which contains
content:
AuthName
"My Protection Directory"
AuthType Basic
AuthUserFile /home/sites/sitex/web/your_protected_directory/.htpasswd
<Limit GET POST>
require valid-user
</Limit> |
Example: |
Domain Name: example.com
My Protected Directory: memberonly
My Protected Area Name: Member Only |
AuthName
"Member Only"
AuthType Basic
AuthUserFile /home/sites/sitex/web/memberonly/.htpasswd
<Limit GET POST>
require valid-user
</Limit> |
|
| |
2)
Then, upload the htaccess.txt to the directory you would like
to protect via FTP, on above example, the directory should be:
memberonly. After that rename the htaccess.txt file name into
.htaccess |
| |
3)
Now, create a file called htpasswd.txt by Notepad which contains
your user name and password. Please use the generator below
to generate your login name and password.
|
|
4)
Copy the encrypted login and password codes into the htpasswd.txt,
and then upload the file to the protected directory via FTP,
on above example, the directory should be: memberonly. After
that rename the htpasswd.txt file into .htpasswd
Remeber everyline contains one "Encrypted
login and password Codes" ONLY!!!! |
| |
Now
your directory should be protected.
|
| |