drawkcaB | Backward Compatible logo

rants and tips about software

CodeIgniter woes

I started using CodeIgniter some time ago, and here are the problems I’m having:

  • nuking of $_GET does sound reasonable, but it makes problems when you want to integrate with some other service like RPX for example. I “fixed” this by writing a small php script outside of framework to take the GET request and turn it into URL acceptable by CI. (Update: apparently, this has been fixed in newer versions. I moved to Yii framework since then, so I haven't checked)
  • The settings for Apache rewrite rule you’ll find first is soo wrong. I mean, it is correct, but it creates a hell of a lot of problems when you want to do something outside of the box. Basically, you have to “allow” anything outside of CI (even images, javascript and css) to be accessible. The alternative snippet I found is much better (it basically says: if it’s a real file, fetch it, if not, route through CI):
  • RewriteEngine on
    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]

…more coming as I build my first serious CI-powered application.

Milan Babuškov, 2009-07-11
Copyright © Milan Babu┼íkov 2006-2014