git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin Waitz <tali@admingilde.org>
To: git@vger.kernel.org
Subject: common URL for repository and gitweb
Date: Thu, 11 May 2006 01:00:46 +0200	[thread overview]
Message-ID: <20060510230046.GC3228@admingilde.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1114 bytes --]

hoi :)

I hacked a little bit in gitweb so that it can get the project path
form the URI without using a ?p= parameter.  That is, you can now
use "http://.../cgi-bin/gitweb.cgi/path/to/project/" to show
the summary of your project.

Together with a apache configuration like below, you can give your
gitweb pages the same URL as your repositories:

	<VirtualHost www:80>
		ServerName git.hostname.org
		DocumentRoot /pub/git
		RewriteEngine on
		RewriteRule ^/(.*\.git/(.*\.html)?)?$ /usr/lib/cgi-bin/gitweb.cgi%{REQUEST_URI}  [L]
	</VirtualHost>

This will rewrite all URLs that go to gitweb to use the CGI, while
leaving URLs for the repository intact.

You can see an example at http://git.admingilde.org/.
The gitweb version used for that is available here, too.

As an added bonus, gitweb can now serve the "html" branch of a
repository directly using "text/html", so you can show your
documentation without needing to update a checked out version
of this branch.
For example have a look at the GIT manpages at
http://git.admingilde.org/tali/git.git/git.html

-- 
Martin Waitz

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

                 reply	other threads:[~2006-05-10 23:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060510230046.GC3228@admingilde.org \
    --to=tali@admingilde.org \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).