1. Stefan Saasen
  2. git


Giuseppe Bilotta  committed 1bed73c

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


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

Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

  • Participants
  • Parent commits 0f70504
  • Branches master

Comments (0)

Files changed (1)

File gitweb/README

View file
  • Ignore whitespace
 	DocumentRoot /var/www/gitweb
-	AliasMatch ^(/.*?)(\.git)(/.*)? /pub/git$1$3
+	AliasMatch ^(/.*?)(\.git)(/.*)?$ /pub/git$1$3
 	<Directory /var/www/gitweb>
 		Options ExecCGI
 		AddHandler cgi-script cgi
 will provide human-friendly gitweb access.
+This solution is not 100% bulletproof, in the sense that if some project
+has a named ref (branch, tag) starting with 'git/', then paths such as
+will fail with a 404 error.
 Originally written by:
   Kay Sievers <kay.sievers@vrfy.org>