Skip to content

Instantly share code, notes, and snippets.

@simonmichael
Created June 27, 2009 19:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simonmichael/137081 to your computer and use it in GitHub Desktop.
Save simonmichael/137081 to your computer and use it in GitHub Desktop.
VirtualHost *>
ServerName hledger.org
ServerAlias www.hledger.org
ServerAlias bugs.hledger.org
ServerAlias mail.hledger.org
ServerAlias list.hledger.org
...
# convenience aliases
# redirect bugs.hledger.org/... and hledger.org/bugs/... to issue tracker
# new issue
RewriteCond %{HTTP_HOST} ^bugs.hledger.org$
RewriteRule ^/new http://code.google.com/p/hledger/issues/entry [L]
RewriteRule ^/bugs/new http://code.google.com/p/hledger/issues/entry [L]
# specific issue
RewriteCond %{HTTP_HOST} ^bugs.hledger.org$
RewriteRule ^/(.+) http://code.google.com/p/hledger/issues/detail?id=$1 [L]
RewriteRule ^/bugs/(.+) http://code.google.com/p/hledger/issues/detail?id=$1 [L]
# issue list
RewriteCond %{HTTP_HOST} ^bugs.hledger.org$
RewriteRule ^/?$ http://code.google.com/p/hledger/issues/list?can=1&q=&colspec=ID+Type+Status+Priority+Milestone+Owner+Summary&x=status&y=type&mode=grid&cel$
RewriteRule ^/bugs/?$ http://code.google.com/p/hledger/issues/list?can=1&q=&colspec=ID+Type+Status+Priority+Milestone+Owner+Summary&x=status&y=type&mode=grid&cel$
# redirect (mail|list).hledger.org/... and hledger.org/(mail|list)/... to mail list
RewriteCond %{HTTP_HOST} ^(mail|list).hledger.org$
RewriteRule ^(.*) http://groups.google.com/group/hledger$1 [L]
RewriteRule ^/(?:mail|list)(/(.*)|$) http://groups.google.com/group/hledger$1 [L]
# serve everything else from the static website in hledger repo
RewriteRule ^(.*) /repos/hledger/website$1 [L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment