<?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>/dev/movabletripe &#187; PHP</title>
	<atom:link href="http://movabletripe.com/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://movabletripe.com</link>
	<description>Making up launch dates since 1982</description>
	<lastBuildDate>Mon, 27 Aug 2007 01:39:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PHP redirect script</title>
		<link>http://movabletripe.com/archive/php-redirect-script/</link>
		<comments>http://movabletripe.com/archive/php-redirect-script/#comments</comments>
		<pubDate>Fri, 16 Feb 2007 03:25:39 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://movabletripe.com/archive/php-redirect-script/</guid>
		<description><![CDATA[When developing and/or designing websites for clients, I often use a quasi versioning system to keep track of older copies of their respective projects. For example, if I often create a repository for all of my development such as http://mybusiness.com/clientname and all subsequent revisions of the project in directories reflecting their version number (http://mybusiness.com/clientname/1/ and [...]]]></description>
			<content:encoded><![CDATA[<p>When developing and/or designing websites for clients, I often use a quasi versioning system to keep track of older copies of their respective projects. For example, if I often create a repository for all of my development such as <code>http://mybusiness.com/clientname</code> and all subsequent revisions of the project in directories reflecting their version number (<code>http://mybusiness.com/clientname/1/</code> and <code>http://mybusiness.com/clientname/3/</code> and so on).</p>
<p>The beauty of this is that when a client inevitably changes their mind regarding an alteration to a design/feature, all of my original work is not lost, and I can easily refer them back to previous revision for comparison.</p>
<p>Below is a simple PHP snippet I use to redirect the user to the latest version of the project. This saves them having to know what number the revisions is up to, and can merely navigate to <code>http://mybusiness.com/clientname</code> and be taken to the most recent trunk.</p>
<blockquote><pre>&lt;?php
$host  = $_SERVER['HTTP_HOST'];
$uri  = rtrim(dirname($_SERVER['PHP_SELF']), '/\');
$revision = '1/';
header(&quot;Location: http://$host$uri/$revision&quot;);
exit;
?&gt;
</pre>
</blockquote>
<p>Save this as index.php in your top level directory, and simply change the variable <code>$revision</code> to reflect the current version.</p>
]]></content:encoded>
			<wfw:commentRss>http://movabletripe.com/archive/php-redirect-script/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
