<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jack Scott&#039;s Blog &#187; HTTP</title>
	<atom:link href="http://jackscott.id.au/tag/http/feed/" rel="self" type="application/rss+xml" />
	<link>http://jackscott.id.au</link>
	<description>Then, one day, I found myself all grown up with my own point of view...</description>
	<lastBuildDate>Fri, 20 Jan 2012 22:59:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Hack of the Year</title>
		<link>http://jackscott.id.au/2009/04/hack-of-the-year/</link>
		<comments>http://jackscott.id.au/2009/04/hack-of-the-year/#comments</comments>
		<pubDate>Sun, 12 Apr 2009 00:27:45 +0000</pubDate>
		<dc:creator>Jack</dc:creator>
				<category><![CDATA[Uncategorised]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Hack]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[HTTP 404]]></category>
		<category><![CDATA[StatPress]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.jackscott.org/?p=141</guid>
		<description><![CDATA[As you might have noticed, I&#8217;ve switched back to using WordPress (again), and managed to dig up all my old blog posts (most of which are utter crap). At the moment I&#8217;m using the lighttpd web server, and I had to play around a bit with mod_rewrite in order to get the pretty URLs working. [...]]]></description>
			<content:encoded><![CDATA[<p>As you might have noticed, I&#8217;ve switched back to using WordPress (again), and managed to dig up all my old blog posts (most of which are utter crap). At the moment I&#8217;m using the <a href="http://www.lighttpd.net/">lighttpd</a> web server, and I had to play around a bit with mod_rewrite in order to get the pretty URLs working. In the end I got lazy and just settled for a hack <a href="http://codesnippets.joyent.com/posts/show/47">I found on the Internet</a>. And as a hack, it&#8217;s pretty epic.</p>
<blockquote>
<pre>server.error-handler-404 = "/index.php?error=404"</pre>
</blockquote>
<p>What it does is thus: when you click on a page in the blog (such as <a href="http://www.jackscott.id.au/2009/04/hack-of-the-year/">http://www.jackscott.id.au/2009/04/hack-of-the-year</a>), it searches for a folder named 2009 on my web server. That doesn&#8217;t exist, so it produces an HTTP 404 error (which means the page doesn&#8217;t exist). The rule above (pasted into the lighttpd configuration file) redirects all 404 errors to the index.php file. And this file (as the WordPress main file) just happens to know where to find the page requested. Truly a monumental hack.</p>
<p><span>The only downside to using this configuration is that <a href="http://wordpress.org/extend/plugins/statpress/">Statpress</a> (my favourite WordPress plugin) no longer works properly. It reports the correct number of page views and so on, but all pages requested are listed as &#8216;</span>error=404<span>&#8216;. Not very useful when you want to see which pages are viewed the most.</span></p>
<p><span>But nevertheless, a pretty cool thing. </span></p>
]]></content:encoded>
			<wfw:commentRss>http://jackscott.id.au/2009/04/hack-of-the-year/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

