import .htaccess, Anders' version
authorGreg Price <price@mit.edu>
Thu, 12 Feb 2009 04:06:50 +0000 (23:06 -0500)
committerGreg Price <price@mit.edu>
Thu, 12 Feb 2009 04:06:50 +0000 (23:06 -0500)
.htaccess [new file with mode: 0644]

diff --git a/.htaccess b/.htaccess
new file mode 100644 (file)
index 0000000..247b755
--- /dev/null
+++ b/.htaccess
@@ -0,0 +1,30 @@
+# Disable CGI scripts and static-cat; serve everything as static content
+# from Apache unless otherwise specified.
+<Files *>
+    SetHandler none
+</Files>
+
+RewriteEngine On
+RewriteBase /
+
+# Redirect /iap to stuff.mit.edu/iap
+RewriteRule ^iap(/.*)?$ http://stuff.mit.edu/iap$1 [R,L]
+
+# Serve some CGI scripts from _wiki-cgi
+RewriteRule ^ikiwiki.cgi$ _wiki-cgi/ikiwiki.cgi [L]
+RewriteRule ^update.cgi$ _wiki-cgi/update.cgi [L]
+
+# Trailing-slash directories served from _wiki
+RewriteCond %{DOCUMENT_ROOT}/_wiki%{REQUEST_URI} -d
+RewriteRule ^(.*[^/])$ $1/ [R=permanent,L]
+
+# Serve most content from _wiki
+RewriteCond %{DOCUMENT_ROOT}/_wiki%{REQUEST_URI} -d [OR]
+RewriteCond %{DOCUMENT_ROOT}/_wiki%{REQUEST_URI} -f
+RewriteRule ^(.*)$ _wiki/$1 [L]
+
+# Strip obsolete /wiki from URLs
+RewriteRule ^wiki(/.*)?$ $1 [R=permanent,L]
+
+# Redirect old /doc/wiki to sipb-www.scripts
+RewriteRule ^doc/wiki(/.*)?$ http://sipb-www.scripts.mit.edu/doc/wiki$1 [R,L]