<?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>bitplane.net &#187; mod_rewrite</title>
	<atom:link href="http://bitplane.net/tag/mod_rewrite/feed/" rel="self" type="application/rss+xml" />
	<link>http://bitplane.net</link>
	<description>Rants, ramblings, free software</description>
	<lastBuildDate>Thu, 09 Feb 2012 02:37:56 +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>PHP file list using mod_rewrite</title>
		<link>http://bitplane.net/2009/09/php-file-list-using-mod_rewrite/</link>
		<comments>http://bitplane.net/2009/09/php-file-list-using-mod_rewrite/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 20:09:00 +0000</pubDate>
		<dc:creator>Gaz Davidson</dc:creator>
				<category><![CDATA[bitplane.net]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[piwik]]></category>

		<guid isPermaLink="false">http://bitplane.net/?p=59</guid>
		<description><![CDATA[Using the mod_rewrite engine to spice up apache file lists.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve noticed that most of the traffic to this site is actually people visiting my <a title="Permanent file storage" href="http://files.bitplane.net" target="_blank">permanent</a> and <a title="Temporary file dump" href="http://dump.bitplane.net" target="_blank">temporary</a> file dumps, which until today were literally a bunch of files dumped in a folder. <a title="My web host, a kind of web hotel" href="http://www.dreamhost.com">DreamHost</a> don&#8217;t keep my logs for over 30 days and I&#8217;d like to incorporate my file dumps into my Piwik stats, so I made a nice fancy file list in PHP. It has nice looking icons courtesy of <a href="http://www.famfamfam.com/lab/icons/silk/" target="_blank">famfamfam</a>, though may move to <a href="http://stdicon.com/" target="_blank">stdicon</a> in the future.</p>
<p>Some caveats:</p>
<ul>
<li>The file list currently tracks directory views (via the template) but not yet file downloads, as that requires a <a title="Add Piwik request by server side script" href="http://dev.piwik.org/trac/ticket/134" target="_blank">Piwik plugin</a> that isn&#8217;t final so I haven&#8217;t installed it, adding it should be trivial though.</li>
<li>As requests are passed through PHP using mod_rewrite it will result in long running scripts on your server, which may upset your shared web hosting provider.</li>
<li>Scripts are not yet excluded by rewrite rules! You won&#8217;t want to keep other scripts containing sensitive information in dirs under the path.</li>
<li>Access to files and folders beginning with &#8220;.&#8221; will be blocked.</li>
<li>It only works on Unices, not Windows servers as they don&#8217;t have the &#8220;file&#8221; command to get the MIME type.</li>
<li>You&#8217;ll obviously need an Apache installation with mod_rewrite.</li>
</ul>
<p>To install it, just copy index.php, .htaccess and .filelist/ to the directory where you store your files. You can get the script (without icons) <a href="http://svn.bitplane.net/misc/trunk/php/filelist/">from SVN</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://bitplane.net/2009/09/php-file-list-using-mod_rewrite/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

