On Aug 27, 2012, at 04:28 , Iain Paton wrote: > On 26/08/12 10:57, Iain Paton wrote: > >> <If "%{THE_REQUEST} =~ /git-receive-pack/"> > > I've just discovered that the <If ..> directive only appears in apache 2.4 > so something more generic will probably be a better idea. Not everyone will > be running 2.4.x for a while yet. You could try something like this: <Location /git> # Require authentication for git push RewriteCond %{QUERY_STRING} service=git-receive-pack RewriteRule .* - [E=AUTHREQUIRED:yes] Order Allow,Deny Deny from env=AUTHREQUIRED Allow from all Satisfy Any # Whatever auth rules you want ... I haven't tested this specific example but it is based upon similar rules I use on a 2.0 server to require auth when specific query parameters are present. In my case, I have the Rewrite rules in the <VirtualHost> and the other directives in the <Directory> being protected. -- BJ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html