tags:

views:

176

answers:

1

I created a password protected folder using .htpasswd. In .htacces how should i specify this .htpasswd file.

like this

AuthUserFile http://alertalert.freetzi.com/admin/.htpasswd

or

like this

AuthUserFile /admin/.htpasswd

or any other method. Plz help

+1  A: 

You should reference the file using its filesystem path, not anything relative to the web server. So if your site is hosted in the folder /var/www/localhost/htdocs/, then you would write:

AuthUserFile /var/www/localhost/htdocs/admin/.htpasswd
Tim