From ea5f7a3135848fc5009659ff1448b70183a26117 Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Thu, 10 Jul 2014 18:13:23 -0700 Subject: [PATCH] apache.conf: make the trailing .git on bare gitweb URLs optional Since the trailing .git is already optional on URLs used with the Git client, make it optional for GitWeb as well, but only for the base repository browser (i.e. the bare summary link). Make these permanent redirects because we require the '.git' portion in the URL path for correct processing of other GitWeb activity. --- apache.conf.in | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/apache.conf.in b/apache.conf.in index c3a7204..ec3c837 100644 --- a/apache.conf.in +++ b/apache.conf.in @@ -31,14 +31,27 @@ ScriptAlias /h @@cgiroot@@/html.cgi - # Make the leading /w optional if the rest names an existing repo RewriteEngine On + # Redirect bare /w requests without .git that name an existing repo... + RewriteCond @@reporoot@@/$1.git/HEAD -f + RewriteRule \ + ^/w/((?:[a-zA-Z0-9+._-]+(? -- 2.11.4.GIT