<?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>Einar Egilsson &#187; Meta</title>
	<atom:link href="http://einaregilsson.com/category/meta/feed/" rel="self" type="application/rss+xml" />
	<link>http://einaregilsson.com</link>
	<description>A site for my programming pet projects</description>
	<lastBuildDate>Fri, 03 Feb 2012 20:08:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Pretty WordPress Permalinks on IIS</title>
		<link>http://einaregilsson.com/pretty-wordpress-permalinks-on-iis/</link>
		<comments>http://einaregilsson.com/pretty-wordpress-permalinks-on-iis/#comments</comments>
		<pubDate>Mon, 30 Jul 2007 11:36:52 +0000</pubDate>
		<dc:creator>einar</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Meta]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://tech.einaregilsson.com/2007/07/30/pretty-wordpress-permalinks-on-iis/</guid>
		<description><![CDATA[UPDATE 16.09.2009: I don&#8217;t update this script anymore, it might not work on newer versions of WordPress. An updated, more robust solution can be found at http://www.ikailo.com/94/url-modrewrite-workaround-iis-60/, go there if the solution below causes problems for your site. I&#8217;ve been searching the web a bit for a way to make pretty permalinks work correctly on [...]]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE 16.09.2009: </strong>I don&#8217;t update this script anymore, it might not work on newer versions of WordPress. An updated, more robust solution can be found at <a href="http://www.ikailo.com/94/url-modrewrite-workaround-iis-60/">http://www.ikailo.com/94/url-modrewrite-workaround-iis-60/</a>, go there if the solution below causes problems for your site.
</p>
<p>I&#8217;ve been searching the web a bit for a way to make pretty permalinks work correctly on this site. The site is hosted on IIS so using mod_rewrite won&#8217;t work, and it&#8217;s on a shared server so the option of installing a mod_rewrite alternative for IIS won&#8217;t work either. I could get away with having almost pretty urls, with a index.php in them, like this: <a href="http://einaregilsson.com/index.php/2007/07/30/pretty-wordpress-permalinks-on-iis/">http://einaregilsson.com/index.php/2007/07/30/pretty-wordpress-permalinks-on-iis/</a> but I didn&#8217;t like it. </p>
<p>The <a href="http://codex.wordpress.org/Using_Permalinks">Using Permalinks</a> section on the WordPress page has a lot of info on this and it links to one <a href="http://www.keyboardface.com/iis-permalinks/">solution that uses custom 404 pages</a> to make this work but unfortunately I don&#8217;t think it&#8217;s a very good solution at all. What it does is parse the url from the 404 string, then re-implement all the rewrite url matching itself, make its own http request to the correct url, then write the data from that request into the response. It&#8217;s a good effort but it&#8217;s duplicating functionality already in WordPress and making a new http request for every page hit which I don&#8217;t like. After searching around some more I found <a href="http://wordpress.org/support/topic/36214">another 404 page solution</a> that is very simple and elegant. All you have to do is create a 404 page and put the following 4 lines in it:</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
$qs = $_SERVER['QUERY_STRING'];
$pos = strrpos($qs, '://');
$pos = strpos($qs, '/', $pos + 4);
$_SERVER['REQUEST_URI'] = substr($qs, $pos);
$_SERVER['PATH_INFO'] = $_SERVER['REQUEST_URI'];
include('index.php');
?&gt;
</pre>
<p>All this does is fix the REQUEST_URI and PATH_INFO variables and then include index.php, so WordPress will do the rest. It&#8217;s simple, it doesn&#8217;t duplicate functionality already in WordPress and it doesn&#8217;t have the overhead of another http request for every page hit. The installation steps are:</p>
<ol>
<li>Create the file wp-404-handler.php in your base WordPress folder. (you can also <a href="/download/wp-404-handler.php.txt">download it here</a>).</li>
<li>Set your sites 404 page to point to the wp-404-handler.php url. Most control panels at web hosts allow you to do this. If you&#8217;ve got the option to select between FILE and URL then choose URL.</li>
<li>Go to Options -&gt; Permalinks in your WordPress admin page, and choose an appropriate structure for your links. I chose Custom with this pattern:
<pre><code>/%year%/%monthnum%/%day%/%postname%/ </code></pre>
</li>
<li>Enjoy!</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://einaregilsson.com/pretty-wordpress-permalinks-on-iis/feed/</wfw:commentRss>
		<slash:comments>326</slash:comments>
		</item>
		<item>
		<title>First post</title>
		<link>http://einaregilsson.com/first-post/</link>
		<comments>http://einaregilsson.com/first-post/#comments</comments>
		<pubDate>Fri, 20 Jul 2007 13:32:20 +0000</pubDate>
		<dc:creator>einar</dc:creator>
				<category><![CDATA[Meta]]></category>

		<guid isPermaLink="false">http://tech.einaregilsson.com/2007/07/26/first-post/</guid>
		<description><![CDATA[Welcome to tech.einaregilsson.com . I&#8217;m setting up this site mostly to keep track of my various small programming projects. I have quite a few Mozilla extensions, some Greasemonkey scripts, WordPress plugins and one or two .NET projects scattered around the web, so I thought it would be good to gather them all in one place. [...]]]></description>
			<content:encoded><![CDATA[<p>Welcome to tech.einaregilsson.com <img src='http://einaregilsson.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  . I&#8217;m setting up this site mostly to keep track of my various small <a href="/projects/" title="List of projects, soon to be completed...">programming projects</a>. I have quite a few Mozilla extensions, some Greasemonkey scripts, WordPress plugins and one or two .NET projects scattered around the web, so I thought it would be good to gather them all in one place. Many of them are still hosted elsewhere but there will at least be a link to all of them here. I haven&#8217;t finished putting everything on the projects page yet but it&#8217;ll be there soon.</p>
<p>I might also write the occasional blog post, however I have my personal blog (in icelandic) over at <a href="http://einaregilsson.com">einaregilsson.com</a> so this place will only be for tech related stuff. I have a few technical things I´ve been wanting to write about but wouldn&#8217;t be of interest to the readers of my personal blog so I´ll post them here when I have the time.</p>
]]></content:encoded>
			<wfw:commentRss>http://einaregilsson.com/first-post/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

