Link to home
Start Free TrialLog in
Avatar of derrida
derrida

asked on

the right path to a .htpasswd file?

Hi
i`m testing htaccess and i know i have to give a full path to the htpasswd file. but each try it does not work.
for testing i put my htpasswd file in the www folder of wamp.
and in the htaccess i wrote:
AuthUserFile C:/wamp/www/.htpasswd

and tries several paths but no working.

any idea?

best regards

ron
Avatar of Chris Harte
Chris Harte
Flag of United Kingdom of Great Britain and Northern Ireland image

On a server paths a relative, so to the server
C:/wamp/www/
will be the root, or just /
So the full path would simply be
/.htpasswd
Avatar of derrida
derrida

ASKER

hi
yes, that is what i thought and tried. but it does not work.
the htaccess file is in a folder called "articles" which is in a folder called "testHtaccess".
the htpasswd file is in the www of wamp.
 
the code of the htaccess is:

Options -Indexes

AuthType Basic

AuthName "Access to the Hidden Files"

AuthUserFile /.htpasswd

Require valid-user
what am i doing wrong?
 
ron
ASKER CERTIFIED SOLUTION
Avatar of Chris Harte
Chris Harte
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of derrida

ASKER

thank you. it work since i get the dialoge but even if i have the right username and password i get this error:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, admin@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
 
any idea?
 
ron