Solved

the right path to a .htpasswd file?

Posted on 2009-05-18
4
357 Views
Last Modified: 2012-05-07
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
0
Comment
Question by:derrida
  • 2
  • 2
4 Comments
 
LVL 17

Expert Comment

by:Chris Harte
ID: 24411842
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
0
 
LVL 1

Author Comment

by:derrida
ID: 24411883
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
0
 
LVL 17

Accepted Solution

by:
Chris Harte earned 500 total points
ID: 24411985
I can not see a problem with that, so you probably have an invalid end of line or tab character. Rather than debugging all that try this tool, its what I use.

http://www.clockwatchers.com/htaccess_tool.html
0
 
LVL 1

Author Comment

by:derrida
ID: 24412129
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
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
issue with DB import 1 36
i am unable to add data to mysql database 6 49
Echo'd values in dropdowns 6 28
Get data from two MySQL tables 6 21
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question