Location hg RewriteEngine on RewriteCond REQUEST_URI hg hgwebdir cgi R

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
<Location "/hg">
RewriteEngine on
RewriteCond %{REQUEST_URI} !hg/hgwebdir\.cgi
RewriteRule /hg(.*)$ /hg/hgwebdir.cgi$1 [R]
AddHandler cgi-script .cgi
Options +ExecCGI
AuthType Basic
AuthName "xa4a mercurial repositories"
AuthGroupFile /dev/null
AuthUserFile /var/www/html/hg/.htpasswd
<LimitExcept GET>
Require valid-user
</LimitExcept>
</Location>
<Directory "/hg">
AllowOverride All
</Directory>