How to specify relative path to the .htpasswd?

0 like 0 dislike
50 views
AuthType Basic
AuthName "Say the password or bite my shiny *ss"
AuthUserFile /home/u*****/example.com/foo/.htpasswd
Require valid-user



How can I specify the relative path .htpasswd to work?


In this case, you need to have this standard .htaccess-tion file can be upload to the repository and then use it in any project, so absolute paths (as in this example) to indicate how you do not want.
by | 50 views

3 Answers

0 like 0 dislike
Relative paths are not supported. Will have to write absolute.
by
0 like 0 dislike
httpd.apache.org/docs/1.3/mod/mod_auth.html#authuserfile
\r
File-path is the path to the user file. If it is not absolute (i.e., if it doesn't begin with a slash), it is treated as relative to the ServerRoot.
by
0 like 0 dislike
Try force server-side programming language php, for example here.
by

Related questions

0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
0 like 0 dislike
2 answers
110,608 questions
257,186 answers
0 comments
28,757 users