From: Giuseppe Bilotta Date: Sat, 27 Jun 2009 16:24:11 +0000 (+0200) Subject: gitweb/README: fix AliasMatch in example X-Git-Url: https://git.ladys.computer/Gitweb/commitdiff_plain/8467d6ae3a28e9398e8be47a8a73c37c8a67474dce4a0118dc21ea7551c4d01e?ds=sidebyside 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 Signed-off-by: Junio C Hamano --- diff --git a/README b/README index e17aece..32e1b4c 100644 --- a/README +++ b/README @@ -376,7 +376,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 Options ExecCGI AddHandler cgi-script cgi @@ -401,6 +401,14 @@ http://git.example.com/project 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 + +http://git.example.com/project/command/abranch..git/abranch + +will fail with a 404 error. + + Originally written by: Kay Sievers