Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

88 lines (81 sloc) 5.562 kb
# force extensionless 'cool URIs' like 'http://www.gwern.net/index' 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\"\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"><html xmlns=\"http://www.w3.org/1999/xhtml\"><head><title>404 Not Found</title></head><body><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"><html xmlns=\"http://www.w3.org/1999/xhtml\"><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 = \'http://www.gwern.net\';</script> <script type=\"text/javascript\" src=\"http://linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js\"></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
</ifModule>
# https://members.nearlyfreespeech.net/forums/viewtopic.php?p=21798#21798
# Add static gzip'd support, again, for performance
## http://www.hunlock.com/blogs/Compressed_HTML_makes_your_pages_zippy
## https://members.nearlyfreespeech.net/forums/viewtopic.php?p=21798#21798
<ifModule mod_rewrite.c>
Options +MultiViews
AddEncoding x-gzip .gz
RewriteEngine on
RewriteOptions Inherit
RewriteCond %{HTTP:Accept-Encoding} .*gzip.*
RewriteCond %{REQUEST_FILENAME}.gz -s
RewriteRule ^(.+) $1.g
RewriteBase /
# http://httpd.apache.org/docs/1.3/misc/rewriteguide.html
# 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
</ifModule>
# redirect URLs that people commonly misspell
## Article targets for moving:
### "Copyright" ~> "Incoherence of Copyright" (?)
### "Culture is not about esthetics" ~> "Culture is not about Esthetics"
### "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" "/static/img/favicon.ico"
RedirectPermanent "/robots.txt" "/static/robots.txt"
RedirectPermanent "/Culture is not about Esthetics" "http://www.gwern.net/Culture is not about esthetics"
RedirectPermanent "/In Defense of Inclusionism" "http://www.gwern.net/In%20Defense%20Of%20Inclusionism"
RedirectPermanent "/Mnemosyne" "http://www.gwern.net/Spaced repetition"
RedirectPermanent "/Mnemosyne.html" "http://www.gwern.net/Spaced repetition"
RedirectPermanent "/N-back FAQ" "http://www.gwern.net/DNB FAQ"
RedirectPermanent "/N-back FAQ.html" "http://www.gwern.net/DNB FAQ"
RedirectPermanent "/N-back%20FAQ.html" "http://www.gwern.net/DNB%20FAQ"
RedirectPermanent "/about.html" "http://www.gwern.net/About"
RedirectPermanent "/haskell summer of code.html" "http://www.gwern.net/Haskell Summer of Code"
RedirectPermanent "/haskell/Archiving%20GitHub.html" "http://www.gwern.net/haskell/Archiving GitHub"
RedirectPermanent "/melatonin" "http://www.gwern.net/Melatonin"
RedirectPermanent "/melatonin.html" "http://www.gwern.net/Melatonin"
RedirectPermanent "/mnemosyne" "http://www.gwern.net/Spaced repetition"
RedirectPermanent "/mnemosyne.html" "http://www.gwern.net/Spaced repetition"
RedirectPermanent "/modafinil" "http://www.gwern.net/Modafinil"
RedirectPermanent "/modafinil.html" "http://www.gwern.net/Modafinil"
RedirectPermanent "/n-back faq" "http://www.gwern.net/DNB FAQ"
RedirectPermanent "/n-back faq.html" "http://www.gwern.net/DNB FAQ"
RedirectPermanent "/nootropics.html" "http://www.gwern.net/Nootropics"
RedirectPermanent "/spaced repetition" "http://www.gwern.net/Spaced repetition"
RedirectPermanent "/melatonin advocacy" "http://www.gwern.net/Melatonin"
RedirectPermanent "/The Value of One Bit" "http://www.gwern.net/Zen and the Art of Bicycle Maintenance"
Jump to Line
Something went wrong with that request. Please try again.