Is it possible to have separate w20 ignore rules for each remote?

Here is my situation. I am setting up a development server and production server on PHP Fog. I have one set of files on my local machine that I would like to work on and click on each of the 2 servers in PHP Fog.

I want my development server to be secure using the traditional htpasswd / htaccess methods. This means that the production server should ignore these two files in my working copy.

Is there any way to tell the production server to ignore these two files when committing, but to allow them to pass when clicking on the development server?

+3
source share
1 answer

, , , htaccess , git.

: " .htaccess git dev "

:

:

dev.yoursite.com www.yoursite.com, , dev.yoursite.com .

:

apache ( ), .htaccess .htpasswd .
.htaccess :

SetEnvIf Host yourstagingserver.com passreq 
AuthType Basic 
AuthName "Staging Server" 
AuthUserFile /path/to/.htpasswd 
Require valid-user 
Order allow,deny 
Allow from all 
Deny from env=passreq 
Satisfy any

dev,

/path/to/.htpasswd, "htpasswd -c .htpasswd mark", , . "htpasswd .htpasswd linda", linda - , .htpasswd.
, ( .htpasswd), , .

:

AuthUserFile , , , httpd.conf, ServerRoot.

+2

All Articles