add redirect for openbox.org/git/USER/SHA to gitweb commit diff
[dana/openbox-web.git] / .htaccess
1 RewriteEngine On
2 RewriteBase /
3
4 # help.php is the wiki
5 RewriteCond %{QUERY_STRING} ^(.+)$
6 RewriteRule ^help.php$ mediawiki/index.php?title=%1 [L,QSA]
7 RewriteCond %{QUERY_STRING} ^$
8 RewriteRule ^help.php$ mediawiki/index.php?title=Help [L,QSA]
9
10 # wiki is stuck in a subdirectory, let it reference these things directly
11 RewriteRule ^mediawiki/css/(.*)$ css/$1 [L]
12 RewriteRule ^mediawiki/images/(.*)$ images/$1 [L]
13 RewriteRule ^mediawiki/h/(.*)$ h/$1 [L]
14
15 # show the stuff in / as /new/*
16 RedirectMatch temp ^/new$ http://openbox.org/new/
17 RewriteRule ^new/?$ new/home.php [L]
18 RewriteRule ^new/(.*)$ $1 [L]
19
20 # old folders
21 #RewriteRule ^releases(.*)$ dist/openbox$1 [L]
22 RedirectMatch permanent ^/releases(.*)$ http://openbox.org/dist/openbox$1
23 #RewriteRule ^obconf(.*)$ dist/obconf$1 [L]
24 RedirectMatch permanent ^/obconf(.*)$ http://openbox.org/dist/obconf$1
25
26 # serve the wiki on /
27 RewriteRule ^$ wiki [L]
28
29 # wiki/ shortcut for the old wiki site
30 RewriteRule ^wiki/?$ oldwiki/index.php?title=Main_Page [L,QSA]
31 RewriteRule ^wiki/(.+)$ oldwiki/index.php?title=$1 [L,QSA]
32
33 RedirectMatch temp ^/git/([^/]+/)(.*)$ http://git.openbox.org/?p=$1openbox.git;a=commitdiff;h=$2