From a5de4e1e1f7fbf10d234957c28a8358c2fb9768c Mon Sep 17 00:00:00 2001 From: Adam Spragg Date: Thu, 26 Jul 2018 15:48:55 +0100 Subject: Host cgit directories under .../cgit.cgi/ Rather than .../cgit/ This allows for a general redirect that can be used in multiple places in the website in future, without it getting confused over the /style/cgit/ directory. Put redirects in to make old links/bookmarks still work. Not as if anyone has made bookmarks already, but it's a good habit to get into. --- apache2.conf | 9 ++++++--- html/projects/index.php | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/apache2.conf b/apache2.conf index 030bac1..12a4e24 100644 --- a/apache2.conf +++ b/apache2.conf @@ -183,15 +183,18 @@ # Enable user-dirs UserDir public_html - # Enable cgitrc at /projects/cgit + # Enable cgitrc at /projects/cgit.cgi SetEnv CGIT_CONFIG /srv/www/spragg-ssl.co.uk/cgitrc - ScriptAlias /projects/cgit/ "/usr/lib/cgit/cgit.cgi/" - RedirectMatch ^/projects/cgit$ /projects/cgit/ + ScriptAlias /projects/cgit.cgi/ "/usr/lib/cgit/cgit.cgi/" + RedirectMatch ^/(.*)/cgit.cgi$ "/$1/cgit.cgi/" AllowOverride None Options ExecCGI FollowSymlinks Require all granted + # Redirect for old links. + RewriteRule "^/projects/cgit$" "/projects/cgit.cgi/" [R,L] + RewriteRule "^/projects/cgit/(.*)" "/projects/cgit.cgi/$1" [R,L] # Enable the STAG trac instance over WSGI #WSGIScriptAlias /c/STAG/trac /srv/www/spragg-ssl.co.uk/html/c/STAG/trac/cgi-bin/trac.wsgi diff --git a/html/projects/index.php b/html/projects/index.php index f7e5f07..88c5ed1 100644 --- a/html/projects/index.php +++ b/html/projects/index.php @@ -13,7 +13,7 @@

The spragg-ssl.co.uk website

Hm. Why does browse→browsable (no "e"), but clone→cloneable (with "e")?

-- cgit v1.2.1