<?xml version="1.0"?>
<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/"
	>
   <channel>
      <pubDate>Fri, 29 Aug 2008 22:18:05 GMT</pubDate>
      <lastBuildDate>Fri, 29 Aug 2008 22:18:05 GMT</lastBuildDate>
      <language>en</language>
      <docs>http://www.rssboard.org/rss-specification</docs>
      <title>CrunchBang ~ unitedhosting</title>
      <link>http://crunchbang.org/tags/unitedhosting/</link>
      <description>Code, Design &amp; GNU/Linux</description>

<item>
    <title>Image Hotlinking Prevention with .htaccess</title>
    <link>http://crunchbang.org/archives/2007/11/02/image-hotlinking-prevention-with-dot-htaccess/</link>
    <pubDate>Fri, 02 Nov 2007 22:58:07 GMT</pubDate>
    <dc:creator>Philip Newborough</dc:creator>
    <guid>http://crunchbang.org/archives/2007/11/02/image-hotlinking-prevention-with-dot-htaccess/</guid>
    <description><![CDATA[
    <p>I&#39;m designing some banners and buttons for <a href="http://ubuntu.com/ " title="Ubuntu Linux">Ubuntu</a> advocacy. I have no problem with giving the images away [<em>indeed this is why I made them,</em>] however I really can&#39;t afford to host them. So before I post them to this site I wanted to ensure that I had some hotlink protection in place.</p>

<p>To accomplish this I&#39;ve created a new directory under my site&#39;s default &#34;images&#34; directory and protected it from hotlinking with an Apache <code>.htaccess</code> file. For future reference here are the contents of the <code>.htaccess</code> file:</p>

<pre><code>RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+.)?example.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*.(jpe?g|gif|bmp|png)$ ../hotlink.gif [L]
</code></pre>

<p>The first line of the above code turns on the <a href="http://en.wikipedia.org/wiki/Rewrite_engine " title="Wikipedia - Rewrite Engine">mod_rewrite engine</a> in Apache. A requirement for the rewrite commands.</p>

<p>The second line matches any requests from the URL example.com [<em>change this to suit your requirements</em>]. The [NC] code means &#34;No Case&#34;, meaning match the URL regardless of case.</p>

<p>The third line allows empty referrals.</p>

<p>Finally, the last line matches any files ending with the extension jpeg, jpg, gif, bmp, or png. This is then replaced by the <code>hotlink.gif</code> file [<em>see below</em>] residing in the above <code>images</code> directory.</p>

<p><img src="http://crunchbang.org/images/hotlink.gif" alt="An example no hotlinking image with message." /></p>

<p>If you need to allow more domains to hotlink to your images you can simply duplicate line two. See the example below:</p>

<pre><code>RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+.)?example.com/ [NC]
RewriteCond %{HTTP_REFERER} !^http://(.+.)?another-example.net/ [NC]
RewriteCond %{HTTP_REFERER} !^http://(.+.)?one-more-example.org/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*.(jpe?g|gif|bmp|png)$ ../hotlink.gif [L]
</code></pre>

    <p style="font-size:smaller;">Tags: <a href="http://crunchbang.org/tags/code/" title="Browse all posts tagged with &#8220;code&#8221;">code</a>, <a href="http://crunchbang.org/tags/images/" title="Browse all posts tagged with &#8220;images&#8221;">images</a>, <a href="http://crunchbang.org/tags/unitedhosting/" title="Browse all posts tagged with &#8220;unitedhosting&#8221;">unitedhosting</a>, <a href="http://crunchbang.org/tags/webdesign/" title="Browse all posts tagged with &#8220;webdesign&#8221;">webdesign</a></p>
    ]]></description>
</item>

<item>
    <title>PHP 5 &amp; Feed Updates</title>
    <link>http://crunchbang.org/archives/2007/10/29/php-and-feed-updates/</link>
    <pubDate>Mon, 29 Oct 2007 11:32:54 GMT</pubDate>
    <dc:creator>Philip Newborough</dc:creator>
    <guid>http://crunchbang.org/archives/2007/10/29/php-and-feed-updates/</guid>
    <description><![CDATA[
    <p>It&#39;s been a long time coming but my website [<em><a href="http://crunchbang.org/ " title="CrunchBang.org">CrunchBang.org</a></em>] is now finally running on PHP 5. My <a href="http://unitedhosting.co.uk " title="United Hosting">hosting provider</a> performed the upgrade earlier this month and made the switch optional on a domain basis. Any domain on their servers can run either PHP version 4 [<em>default</em>] or upgrade to version 5 by adding a script handler in <code>.htaccess</code>:</p>

<pre><code>Action php5-script /interpreters/php5-script
AddHandler php5-script .php
</code></pre>

<p>My development systems all run PHP 5 so the switch was a breeze. Hopefully from now on I&#39;ll be able to avoid <a href="http://crunchbang.org/archives/2007/09/26/php-strrpos-vs-strpos/ " title="strrpos vs strpos">stuff like this</a>.</p>

<p>Also, I&#39;ve been working on my <a href="http://crunchbang.org/tags/whird/ " title="Posts relating to Whird">Whird project</a> over the weekend. I&#39;ve now added feeds for individual tags and updated various features to improve usability. I&#39;ve had to place some URL rewrites for the new feeds and I&#39;m hoping that the various planets [<em><a href="http://ubuntuweblogs.org/ " title="Planet Ubuntu Users">Planet Ubuntu Users</a>, <a href="http://planet.ubuntu-uk.org/ " title="Planet Ubuntu UK">Planet Ubuntu UK</a></em>] don&#39;t get flooded &#8212; I apologise if they do :)</p>

    <p style="font-size:smaller;">Tags: <a href="http://crunchbang.org/tags/code/" title="Browse all posts tagged with &#8220;code&#8221;">code</a>, <a href="http://crunchbang.org/tags/php/" title="Browse all posts tagged with &#8220;php&#8221;">php</a>, <a href="http://crunchbang.org/tags/ubuntu/" title="Browse all posts tagged with &#8220;ubuntu&#8221;">ubuntu</a>, <a href="http://crunchbang.org/tags/unitedhosting/" title="Browse all posts tagged with &#8220;unitedhosting&#8221;">unitedhosting</a>, <a href="http://crunchbang.org/tags/whird/" title="Browse all posts tagged with &#8220;whird&#8221;">whird</a></p>
    ]]></description>
</item>

<item>
    <title>United Hosting Server Upgrades</title>
    <link>http://crunchbang.org/archives/2007/10/05/united-hosting-server-upgrades/</link>
    <pubDate>Fri, 05 Oct 2007 13:39:13 GMT</pubDate>
    <dc:creator>Philip Newborough</dc:creator>
    <guid>http://crunchbang.org/archives/2007/10/05/united-hosting-server-upgrades/</guid>
    <description><![CDATA[
    <p>My hosting provider is currently <a href="http://www.unitedforums.co.uk/vb/network-server-status/10766-server-upgrades-october-all-servers.html " title="Fingers crossed for the switch to PHP5.">performing upgrades</a> to all of their servers. I&#39;ve been with United Hosting for about 4 years now and I can honestly say that they are the best hosting provider that I&#39;ve had the pleasure to use.</p>

<p>In the time that I&#39;ve been with them they have grown enormously and have an obvious commitment to constantly improving their services. I can confidently expect no downtime during this upgrade. It&#39;s a nice feeling when you have complete confidence in your host.</p>

<p><strong>Note:</strong> <em>I wouldn&#39;t normally plug commercial services on my blog. However, respect where respect is due!</em></p>

    <p style="font-size:smaller;">Tags: <a href="http://crunchbang.org/tags/hosting/" title="Browse all posts tagged with &#8220;hosting&#8221;">hosting</a>, <a href="http://crunchbang.org/tags/unitedhosting/" title="Browse all posts tagged with &#8220;unitedhosting&#8221;">unitedhosting</a></p>
    ]]></description>
</item>

 </channel>
</rss>