Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
87 lines (80 sloc) 5.53 KB
# force extensionless 'cool URIs' like '' to be served as HTML
DefaultType text/html
DirectoryIndex index
ErrorDocument 404 "<?xml version=\"1.0\" encoding=\"UTF-8\" ?><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\"\"><html xmlns=\"\"><head><title>404 Not Found</title></head><body><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"\"><html xmlns=\"\"><head><meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\" /><meta name=\"generator\" content=\"pandoc\" /><title></title></head><body><blockquote><p>'Every shrub, every tree - <br />if one has not forgotten <br />where they were planted - <br />has beneath the fallen snow <br />some vestige of its form.'</p></blockquote><script type=\"text/javascript\"> var GOOG_FIXURL_LANG = \'en\'; var GOOG_FIXURL_SITE = \'\';</script> <script type=\"text/javascript\" src=\"\"></script></body></html></body></html>"
# cover source files - text/html runs all lines together; ugly & semantics-destroying
AddType text/x-markdown .page
AddType text/x-haskell .hs
AddType text/x-literate-haskell .lhs
AddType application/x-gzip *.gz
# Add caching/expire headers for performance
FileETag MTime
<ifModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 2 days"
ExpiresByType text/css "access plus 40 days"
ExpiresByType text/javascript "access plus 60 days"
ExpiresByType application/javascript "access plus 60 days"
## expire images after a month or so
ExpiresByType image/png A3592000
ExpiresByType image/jpg A3592000
ExpiresByType image/jpeg A3592000
ExpiresByType image/svg A3592000
ExpiresByType image/x-icon A7592000
## the PDFs are likewise usually unchanging
ExpiresByType application/pdf A4592000
Header set Cache-Control "public, must-revalidate"
# Add static gzip'd support, again, for performance
<ifModule mod_rewrite.c>
Options +MultiViews
AddEncoding x-gzip .gz
RewriteEngine on
RewriteOptions Inherit
RewriteBase /
# parse out basename, but remember the fact
RewriteRule ^(.*)\.html(\#.*)?$ $1 [C,E=WasHTML:yes]
# rewrite 'document.html' to 'document' if exists
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*)$ $1$2 [R=301,L]
# else reverse the previous basename cutout
RewriteCond %{ENV:WasHTML} ^yes$
RewriteRule ^(.*)$ $1.html
# redirect URLs that people commonly misspell
## Article targets for moving:
### "Copyright" ~> "Incoherence of Copyright" (?)
### "WP RSS bot" ~> "Wikipedia RSS Bot"
### "WP redirect generator" ~> "Wikipedia Redirect Generator"
### "Wikipedia and Dark side editing" ~> "Wikipedia and Dark Side Editing"
### "Wikipedia and Other Wikis" ~> "Wikipedia and other Wikis"
RedirectPermanent "/favicon.ico" ""
RedirectPermanent "/robots.txt" ""
RedirectPermanent "/Culture is not about esthetics" " is not about Esthetics"
RedirectPermanent "/In Defense of Inclusionism" ""
RedirectPermanent "/Mnemosyne" " repetition"
RedirectPermanent "/Mnemosyne.html" " repetition"
RedirectPermanent "/N-back FAQ" " FAQ"
RedirectPermanent "/N-back FAQ.html" " FAQ"
RedirectPermanent "/N-back%20FAQ.html" ""
RedirectPermanent "/about.html" ""
RedirectPermanent "/haskell summer of code.html" " Summer of Code"
RedirectPermanent "/haskell/Archiving%20GitHub.html" " GitHub"
RedirectPermanent "/melatonin" ""
RedirectPermanent "/melatonin.html" ""
RedirectPermanent "/mnemosyne" " repetition"
RedirectPermanent "/mnemosyne.html" " repetition"
RedirectPermanent "/modafinil" ""
RedirectPermanent "/modafinil.html" ""
RedirectPermanent "/n-back faq" " FAQ"
RedirectPermanent "/n-back faq.html" " FAQ"
RedirectPermanent "/nootropics.html" ""
RedirectPermanent "/spaced repetition" " repetition"
RedirectPermanent "/melatonin advocacy" ""
RedirectPermanent "/The Value of One Bit" " and the Art of Bicycle Maintenance"
RedirectPermanent "/sunkcost" " cost"
RedirectPermanent "/cse" ""
Jump to Line
Something went wrong with that request. Please try again.