<?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>Made of String &#187; htaccess</title>
	<atom:link href="http://madeofstring.co.uk/tag/htaccess/feed/" rel="self" type="application/rss+xml" />
	<link>http://madeofstring.co.uk</link>
	<description>Still not a very good programmer despite all that tea</description>
	<lastBuildDate>Sun, 29 Jan 2012 21:29:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Getting clean URLs in CodeIgniter to work on Dreamhost</title>
		<link>http://madeofstring.co.uk/article/getting-clean-urls-in-codeigniter-to-work-on-dreamhost/</link>
		<comments>http://madeofstring.co.uk/article/getting-clean-urls-in-codeigniter-to-work-on-dreamhost/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 23:05:55 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[dreamhost]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://madeofstring.co.uk/?p=32</guid>
		<description><![CDATA[Dreamhost, dammit. They seem to get a lot of criticism, but for my testing, fiddling purposes it&#8217;s more or less perfect &#8211; their shared hosting is cheap and they offer SSH access, and the ability to run Ruby apps alongside the usual PHP action. 
But getting CodeIgniter to do clean URLs was a faff. Out [...]]]></description>
			<content:encoded><![CDATA[<p>Dreamhost, dammit. They seem to get a lot of criticism, but for my testing, fiddling purposes it&#8217;s more or less perfect &#8211; their shared hosting is cheap and they offer SSH access, and the ability to run Ruby apps alongside the usual PHP action. </p>
<p>But getting CodeIgniter to do clean URLs was a faff. Out of the box with CodeIgniter you get this&#8230;.</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">http://madeofstring.co.uk/index.php/squirrels</div></div>
<p>&#8230;when instead you want this:</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">http://madeofstring.co.uk/squirrels</div></div>
<p>The trick is down to some .htaccess faffing. (Sysadmins will balk at this, because the right place to fix this is in httpd.conf, but with Dreamhost we don&#8217;t have that level of access). Your .htaccess file should look something like this:</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">RewriteEngine On<br />
RewriteBase /squirrels<br />
<br />
RewriteCond %{REQUEST_FILENAME} !-f<br />
RewriteCond %{REQUEST_FILENAME} !-d<br />
RewriteRule ^(.*)$ /squirrels/index.php?/$1 [L]</div></div>
<p>Note the ? after the index.php. </p>
<p>I also add this at the top to enable compression of the content being transmitted:</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;IfModule mod_deflate.c&gt;<br />
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/javascript text/javascript application/x-javascript<br />
&lt;/IfModule&gt;</div></div>
<p>In my config.php file I also had to change my uri_protocol parameter, like this:</p>
<div class="codecolorer-container php blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$config</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'uri_protocol'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;REQUEST_URI&quot;</span><span style="color: #339933;">;</span></div></div>
<p>&#8230;and then we&#8217;re done &#8211; clean URLs in CodeIgniter on Dreamhost.</p>
]]></content:encoded>
			<wfw:commentRss>http://madeofstring.co.uk/article/getting-clean-urls-in-codeigniter-to-work-on-dreamhost/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Trouble with MAMP &#8211; &#8220;You don&#8217;t have permission to access /MAMP/ on this server.&#8221;</title>
		<link>http://madeofstring.co.uk/article/trouble-with-mamp-you-dont-have-permission-to-access-mamp-on-this-server/</link>
		<comments>http://madeofstring.co.uk/article/trouble-with-mamp-you-dont-have-permission-to-access-mamp-on-this-server/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 21:40:49 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[mamp]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://madeofstring.co.uk/?p=28</guid>
		<description><![CDATA[Don&#8217;t tell me, you&#8217;ve just installed Wordpress on your local MAMP setup and it&#8217;s all gone wrong &#8211; you can no longer get to phpmyadmin and the MAMP setup page generally.
Check the root of your Mac hard disk &#8211; there should be a .htaccess file lurking there, with contents that include&#8230;
Options All -Indexes

# BEGIN WordPress
&#60;IfModule [...]]]></description>
			<content:encoded><![CDATA[<p>Don&#8217;t tell me, you&#8217;ve just installed Wordpress on your local MAMP setup and it&#8217;s all gone wrong &#8211; you can no longer get to phpmyadmin and the MAMP setup page generally.</p>
<p>Check the root of your Mac hard disk &#8211; there should be a .htaccess file lurking there, with contents that include&#8230;</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Options All -Indexes<br />
<br />
# BEGIN WordPress<br />
&lt;IfModule mod_rewrite.c&gt;<br />
RewriteEngine On<br />
... (and so on...)</div></div>
<p>Delete this file, or rename it if you&#8217;re not happy about doing that. Go to your MAMP start page and everything should be OK again. Time for a celebratory cup of tea.</p>
<p><strong>Update 16th Feb</strong>: <a href="http://benfrain.com/notepad/2010/02/mamp-error-–-“you-don’t-have-permission-to-access-mamp-on-this-server”.html">Ben Frain</a> notes that you might not see the .htaccess in your root folder because it&#8217;s a hidden file &#8211; his blog post details the Terminal command you need to show all files.</p>
]]></content:encoded>
			<wfw:commentRss>http://madeofstring.co.uk/article/trouble-with-mamp-you-dont-have-permission-to-access-mamp-on-this-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

