Page 1 of 1

/ means root?

PostPosted: 08. March 2007 08:17
by 04nunhucks
hi, newbie here

When I use / in htaccess, apache looks for C:/.htpasswd
if I try this: htaccess/.htpasswd, it looks for C:/xampp/apapche/htaccess/.htpasswd.

I need / to mean the root the root so I can have /htaccess/.htpasswd.

How do I do this?

PostPosted: 08. March 2007 13:29
by Wiedmann
I need / to mean the root the root

And that's what you have:
When I use / in htaccess, apache looks for C:/.htpasswd

"/" is the root of your filesystem. And if Apache is installed on drive c it's the root directory "c:/".

(In this directive you have a normal filesystem access)

PostPosted: 08. March 2007 13:53
by 04nunhucks
but how do I get to the root of the website i.e. htdocs?

PostPosted: 08. March 2007 13:56
by Wiedmann
but how do I get to the root of the website i.e. htdocs?

?
(just look in the "httpd.conf" what you have configured as DocumentRoot)

PostPosted: 10. March 2007 11:38
by WorldDrknss
When creating .htaccess files you use the full path.
Try:
C:/xampp/apapche/htdocs/.htpasswd. or /xampp/apapche/htdocs/.htpasswd
http://wdguides.org/gusion.php?name=gen ... hehtaccess

example htaccess:
Code: Select all
AuthUserFile /xampp/xampp/htdocs/.htpasswd
AuthGroupFile /dev/null
AuthName "Password Protected Area"
AuthType Basic

<limit GET POST>
require valid-user
</limit>

example htpasswd:
Code: Select all
test:$apr1$Mb1.....$sGSccCGmLldDhfL79QK/W1

PostPosted: 18. March 2007 16:43
by 04nunhucks
Aha, right thanks.