I want to create a .htaccess file in my DocumentRoot, so that the directory is password protected.
But the password file, I want to specify by using the relative path of DocumentRoot.
So, if I am checking out the code in another system, it just works as it is. The password file will be part of my source control.
How can I access the parent directory of the DocumentRoot from .htaccess file?
I don’t think that’s possible. The AuthUserFile
directive requires the file-path to be either absolute (thus from file system root) or relative from the server root.