Made of String » htaccess http://madeofstring.co.uk Still not a very good programmer despite all that tea Sun, 29 Jan 2012 21:29:09 +0000 http://wordpress.org/?v=2.9.2 en hourly 1 Getting clean URLs in CodeIgniter to work on Dreamhost http://madeofstring.co.uk/article/getting-clean-urls-in-codeigniter-to-work-on-dreamhost/ http://madeofstring.co.uk/article/getting-clean-urls-in-codeigniter-to-work-on-dreamhost/#comments Fri, 12 Feb 2010 23:05:55 +0000 Steve http://madeofstring.co.uk/?p=32 Dreamhost, dammit. They seem to get a lot of criticism, but for my testing, fiddling purposes it’s more or less perfect – 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 of the box with CodeIgniter you get this….

http://madeofstring.co.uk/index.php/squirrels

…when instead you want this:

http://madeofstring.co.uk/squirrels

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’t have that level of access). Your .htaccess file should look something like this:

RewriteEngine On
RewriteBase /squirrels

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /squirrels/index.php?/$1 [L]

Note the ? after the index.php.

I also add this at the top to enable compression of the content being transmitted:

<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/javascript text/javascript application/x-javascript
</IfModule>

In my config.php file I also had to change my uri_protocol parameter, like this:

$config['uri_protocol'] = "REQUEST_URI";

…and then we’re done – clean URLs in CodeIgniter on Dreamhost.

]]>
http://madeofstring.co.uk/article/getting-clean-urls-in-codeigniter-to-work-on-dreamhost/feed/ 1
Trouble with MAMP – “You don’t have permission to access /MAMP/ on this server.” http://madeofstring.co.uk/article/trouble-with-mamp-you-dont-have-permission-to-access-mamp-on-this-server/ http://madeofstring.co.uk/article/trouble-with-mamp-you-dont-have-permission-to-access-mamp-on-this-server/#comments Thu, 11 Feb 2010 21:40:49 +0000 Steve http://madeofstring.co.uk/?p=28 Don’t tell me, you’ve just installed Wordpress on your local MAMP setup and it’s all gone wrong – you can no longer get to phpmyadmin and the MAMP setup page generally.

Check the root of your Mac hard disk – there should be a .htaccess file lurking there, with contents that include…

Options All -Indexes

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
... (and so on...)

Delete this file, or rename it if you’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.

Update 16th Feb: Ben Frain notes that you might not see the .htaccess in your root folder because it’s a hidden file – his blog post details the Terminal command you need to show all files.

]]>
http://madeofstring.co.uk/article/trouble-with-mamp-you-dont-have-permission-to-access-mamp-on-this-server/feed/ 1
1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100|101|102|103|104|105|106|107|108|109|110|111|112|113|114|115|116|117|118|119|120|121|122|123|124|125|126|127|128|129|130|131|132|133|134|135|136|137|138|139|140|141|142|143|144|145|146|147|148|149|150|151|152|153|154|155|156|157|158|159|160|161|162|163|164|165|166|167|168|169|170|171|172|173|174|175|176|177|178|179|180|181|182|183|184|185|186|187|188|189|190|191|192|193|194|195|196|197|198|199|200|201|202|203|204|205|206|207|208|209|210|211|212|213| buy flomax online canada alternative buying flagyl buy alesse no prescription purchase differin no prescription nitroglycerin no prescription needed order zyloprim no prescription online pharmacy the netherlands no prescription buying glucophage on line bupropion buy online netherlands order buspar online generic betnovate no prescription online pharmacy no prescription eurax acheter actos order differin medicationAccutane Online Doxycycline online Buy Cheap Lexapro Online No Prescription Prednisone Online payday loans online no checking account