Provide a generate-preview script that people can use to locally generate the wiki...
[sipb-www.git] / .htaccess
1 # Disable CGI scripts and static-cat; serve everything as static content
2 # from Apache unless otherwise specified.
3 <Files *>
4     SetHandler none
5 </Files>
6
7 RewriteEngine On
8 RewriteBase /
9
10 # Serve some CGI scripts from _wiki-cgi
11 RewriteRule ^ikiwiki.cgi$ _wiki-cgi/ikiwiki.cgi [L]
12 RewriteRule ^update.cgi$ _wiki-cgi/update.cgi [L]
13
14 # Trailing-slash directories served from _wiki
15 RewriteCond %{DOCUMENT_ROOT}/_wiki%{REQUEST_URI} -d
16 RewriteRule ^(.*[^/])$ $1/ [R=permanent,L]
17
18 # Serve most content from _wiki
19 RewriteCond %{DOCUMENT_ROOT}/_wiki%{REQUEST_URI} -d [OR]
20 RewriteCond %{DOCUMENT_ROOT}/_wiki%{REQUEST_URI} -f
21 RewriteRule ^(.*)$ _wiki/$1 [L]
22
23 # Strip obsolete /wiki from URLs
24 RewriteRule ^wiki(/.*)?$ $1 [R=permanent,L]
25
26 # Redirect old /doc/wiki to sipb-www.scripts
27 RewriteRule ^doc/wiki(/.*)?$ http://sipb-www.scripts.mit.edu/doc/wiki$1 [R,L]