I am developing an application that has to run both locally as well as on a remote server. One directory is protected using an htpasswd
file. This how I have to define the path to the htpasswd
file in the htaccess
file:
AuthUserFile ../app/some-folder/.htpasswd
Unfortunately the app
folder is required on the server, but I don't have that locally. Instead, the path has to look like this:
AuthUserFile /Volumes/some/very/long/path/some-folder/.htpasswd
Is it possible to us en if/else statement to switch this AuthUserFile path according to the current host (Edit: Or better yet, don't require any authentication locally)? Or is there another workaround to make this file work on both my local and the remote host?