Git Smart HTTP(S) with a URL redirect, not working

view story

http://serverfault.com – I am trying to have GitList (PHP web viewer for git) and GIT Smart HTTP(S) under the same domain git.domain.ext. The following is the actual setup: GIT Smart HTTP URLs are the form git.domain.ext/git/reponame.git GitList is served through git.domain.ext/gitlist So far, so good. Everything works. What I would like to achieve is the following: Any request of the form git.domain.ext/*.git should instead go to git.domain.ext/git/*.git Any other request should default to git.domain.ext/gitlist The following is my Apache config: <VirtualHost *:443> ServerName git.domain.ext (HowTos)