I've 2 copies of this site synced with Subversion. One live version and something developer version. What I love to do would be to password safeguard the developer version, utilizing a .htaccess file:
AuthType Basic
AuthName "Restricted Files"
AuthUserFile ../.htpasswd
AuthPGAuthoritative Off
Require user dev
It is possible to method to sync this .htaccess file towards the live version with no password protection there?
I believed about something similar to
[if file exists ../.htpasswd]
AuthType Basic
AuthName "Restricted Files"
AuthUserFile ../.htpasswd
AuthPGAuthoritative Off
Require user dev
[/if]
or
[if currentDir = /path/to/dev/version]
...
[/if]
Finaly found the solution right here: How can I password protect dev but not live while using SVN?
If mod_setenvif
is enabled it's possible to set different env vars
SetEnvIfNoCase ^HOST$ .+ unauthenticated
SetEnvIfNoCase ^HOST$ ^dev\.example\.com$ !unauthenticated