<?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>maxpagels.com &#187; lessn</title>
	<atom:link href="http://www.maxpagels.com/tag/lessn/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.maxpagels.com</link>
	<description>Est. MMVIII</description>
	<lastBuildDate>Wed, 08 Feb 2012 18:54:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<cloud domain='www.maxpagels.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
		<item>
		<title>WP Lessn</title>
		<link>http://jayrobinson.org/2009/12/12/wordpress-plugin-wp-lessn/</link>
		<comments>http://www.maxpagels.com/2010/06/04/wp-lessn/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 15:23:55 +0000</pubDate>
		<dc:creator>Max Pagels</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[lessn]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.maxpagels.com/?p=2586</guid>
		<description><![CDATA[A nice WordPress plugin for Lessn. I&#8217;d also like to se a plugin leveraging the built-in short URL function the_shortlink() that will be introduced in WP3.]]></description>
			<content:encoded><![CDATA[<p>A nice WordPress plugin for <a href="http://www.shauninman.com/archive/2009/08/17/less_n">Lessn</a>. I&#8217;d also like to se a plugin leveraging the built-in short URL function <code><a href="http://codex.wordpress.org/Template_Tags/the_shortlink">the_shortlink()</a></code> that will be introduced in WP3.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maxpagels.com/2010/06/04/wp-lessn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lessn and domain aliases</title>
		<link>http://www.maxpagels.com/2009/12/01/lessn-and-domain-aliases/</link>
		<comments>http://www.maxpagels.com/2009/12/01/lessn-and-domain-aliases/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 14:11:53 +0000</pubDate>
		<dc:creator>Max Pagels</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[domainaliases]]></category>
		<category><![CDATA[domains]]></category>
		<category><![CDATA[lessn]]></category>

		<guid isPermaLink="false">http://www.maxpagels.com/?p=1065</guid>
		<description><![CDATA[⌘mp.ws, which I prepared earlier, is now being used as the domain for my own URL shortener. I am using Shaun Inman&#8216;s excellent Lessn software for this, but I had to tweak it a bit to get it to use my domain alias ⌘mp.ws instead of the longer maxpagels.com domain for the short URLs it [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://⌘mp.ws">⌘mp.ws</a>, which I prepared earlier, is now being used as the domain for my own URL shortener. I am using <strong>Shaun Inman</strong>&#8216;s excellent <a href="http://www.shauninman.com/archive/2009/08/17/less_n">Lessn</a> software for this, but I had to tweak it a bit to get it to use my  domain alias ⌘mp.ws instead of the longer maxpagels.com domain for the short URLs it generates.</p>
<p>It&#8217;s a short fix, really. Line eight of <code>index.php</code> inside the <code>-/</code> directory of my Lessn installation used to look like so:</p>
<p>[php firstline="8" toolbar="false"]define(&#8216;LESSN_DOMAIN&#8217;, 	preg_replace(&#8216;#^www\.#&#8217;, &#8221;, $_SERVER['SERVER_NAME']));[/php]</p>
<p>Th problem here is the PHP <code>$_SERVER</code> variable that is used at the very end of the line. <code>$_SERVER['SERVER_NAME']</code> returns the following, <a href="http://www.php.net/manual/en/reserved.variables.server.php">according to www.php.net</a>:</p>
<blockquote><p>The name of the server host under which the current script is executing. If the script is running on a virtual host, this will be the value defined for that virtual host.</p></blockquote>
<p>In my case, <code>$_SERVER['SERVER_NAME']</code> returned www.maxpagels.com. By replacing <code>$_SERVER['SERVER_NAME']</code> with the domain alias ⌘mp.ws, everything started working as I wanted it to. So, if you find yourself in a similar situation, just replace this line:</p>
<p>[php firstline="8" toolbar="false"]define(&#8216;LESSN_DOMAIN&#8217;, 	preg_replace(&#8216;#^www\.#&#8217;, &#8221;, $_SERVER['SERVER_NAME']));[/php]</p>
<p>with this one:</p>
<p>[php firstline="8" toolbar="false"]define(&#8216;LESSN_DOMAIN&#8217;, 	preg_replace(&#8216;#^www\.#&#8217;, &#8221;,&#8217;YOUR_DOMAIN_ALIAS&#8217;));[/php]</p>
<p>Then it&#8217;s just a matter of changing <code>YOUR_DOMAIN_ALIAS</code> to, well, your domain alias.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maxpagels.com/2009/12/01/lessn-and-domain-aliases/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

