gitweb/README: fix AliasMatch in example
When combining "dumb client" and human-friendly access by using the '.git' extension to switch between the two, make sure the AliasMatch covers the entire request. Without a full match, a request for http://git.example.com/project/shortlog/branch..gitsomething would result in a 404 because the server would try to access the the project 'project/shortlog/branch.' The solution is still not bulletproof, so document the possible failing case. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Giuseppe Bilotta committed
Jun 27, 2009 at 18:24 UTC
1bed73c64a354248d6b342e58df257e8233bcbd2
1 file changed
+9
-1
gitweb/README
+9
-1
@@ -377,7 +377,7 @@ named without a .git extension (e.g. /pub/git/project instead of
377
378
DocumentRoot /var/www/gitweb
379
380
- AliasMatch ^(/.*?)(\.git)(/.*)? /pub/git$1$3
380
+ AliasMatch ^(/.*?)(\.git)(/.*)?$ /pub/git$1$3
381
<Directory /var/www/gitweb>
382
Options ExecCGI
383
AddHandler cgi-script cgi
@@ -402,6 +402,14 @@ http://git.example.com/project
402
403
will provide human-friendly gitweb access.
404
405
+This solution is not 100% bulletproof, in the sense that if some project
406
+has a named ref (branch, tag) starting with 'git/', then paths such as
407
+
408
+http://git.example.com/project/command/abranch..git/abranch
409
+
410
+will fail with a 404 error.
411
+
412
+
413
414
Originally written by:
415
Kay Sievers <kay.sievers@vrfy.org>