path: root/gitweb/README
diff options
authorGiuseppe Bilotta <>2009-06-27 16:24:11 (GMT)
committerJunio C Hamano <>2009-06-27 20:15:57 (GMT)
commit1bed73c64a354248d6b342e58df257e8233bcbd2 (patch)
tree037dc2b3db7a91dba9dc79a1a6aa0a6cfbd1d054 /gitweb/README
parent0f7050469b7ae9a95ab01880ecd5cf22e6e41dd2 (diff)
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 case. Signed-off-by: Giuseppe Bilotta <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'gitweb/README')
1 files changed, 9 insertions, 1 deletions
diff --git a/gitweb/README b/gitweb/README
index ccda890..9056d1e 100644
--- a/gitweb/README
+++ b/gitweb/README
@@ -377,7 +377,7 @@ named without a .git extension (e.g. /pub/git/project instead of
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
@@ -402,6 +402,14 @@
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 <>