cannot create password protected directory (htaccess)

error_22

Registered
Aug 9, 2005
4
0
151
Hi,

When Im password protect a directory nothing happens, I ahve done this many times on another server (also with cPanel) so I know I'm not doing any mistakes. What to do?

Thanks in advance
Niklas Garphult
 

kekays

Active Member
Nov 2, 2004
30
0
156
Kochin
cPanel Access Level
DataCenter Provider
You can do this thru this shell. Create .htaccess file on which directry to you have to protect and put this contect in that location

=================================
AuthUserFile /home/username/public_html/somepath/.htpasswd
AuthGroupFile /dev/null
AuthName "Somewhere.com's Secret Section"
AuthType Basic

<Limit GET POST>
require valid-user
</Limit>
=================================

htpasswd -c /home/username/public_html/somepath/.htpasswd username

Adding password for username.

New password:

password

Re-type new password:

password

===============================