Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

the right path to a .htpasswd file?

Posted on 2009-05-18
4
Medium Priority
?
370 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 2000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

876 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