Solved

the right path to a .htpasswd file?

Posted on 2009-05-18
4
350 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 16

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 16

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
This article discusses how to create an extensible mechanism for linked drop downs.
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 create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

758 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now