.htaccess
Dear forum,
I'm trying to protect one of the folder on my webserver and after googling few alternatives I've decided to use the .htaccess file and this is what I've done:
edited "/etc/httpd/conf/httpd.conf" as follow:
<Directory "/var/www/html">
Options Indexes Includes FollowSymLinks
AllowOverride all
Allow from from all
Order allow,deny
</Directory>
<Directory "/var/www/icons">
Options Indexes MultiViews
AllowOverride None
Allow from from all
Order allow,deny
</Directory>
<Directory "/var/www/cgi-bin">
Options ExecCGI
AllowOverride None
Allow from from all
Order allow,deny
</Directory>
the .htaccess file contains:
AuthName "Enter Password"
AuthType Basic
AuthUserFile /var/www/html/Mydirectory/.htpasswd
require valid-user
then I've created the "/var/www/html/Mydirectory/.htpasswd" file with the command "htaccess -c .htpasswd username"
then I've successfully entered the password.
Result:
I get promped for username and password when I open the protected pages with Netscape or IE but... for some reason is not authenticating, it keeps asking for username and password.
does any one have any clue on what is causing the authentication to fail???
Any help is appreciated!!!
Thanks in advance.
|