Solved

the right path to a .htpasswd file?

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to dynamically set the form action using jQuery.
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 …

837 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