John McCollum

Removing index.php for Codeigniter (Zeus Server)

Just a quick post – spent a few hours the other night trying to get Zeus Rewrite to play ball so that this:

http://www.example.com/index.php/controller

turned into this:
http://www.example.com/controller

There’s a distinct lack of examples for Zeus rewrite, but here’s what worked for me:
map path into SCRATCH:DOCROOT from /

set SCRATCH:REQUEST_URI = %{URL}

look for file at %{SCRATCH:DOCROOT}%{SCRATCH:REQUEST_URI}
if not exists then look for dir at %{SCRATCH:REQUEST_URI}%{SCRATCH:REQUEST_URI}
if not exists then set URL = /index.php%{SCRATCH:REQUEST_URI}

Your mileage may vary; some tweaking may be required for your particular set up. Hopefully this post saves someone some work!

Posted in PHP, web development at December 6th, 2008. 3 Comments.

Toawema goes live!

We’ve just put the finishing touches on Toawema, a brand new prize draw website!

We used Codeigniter, with JQuery for the UI.

Using Codeigniter was a dream. It’s well known for its speed and lightweight footprint, but there are at least three other advantages that really sold it to me.

Firstly, there’s a huge amount of flexibility compared to other frameworks. Works with almost any host, and any PHP version going back to 4.3.2. No command line jiggery-pokery needed to get it going. Completely open source, so you can hack away at the core to your heart’s content (or better, extend it.)

In fact, it is so flexible that you don’t even need to comply with the MVC design pattern – you could, if you wanted to, completely ditch the model and work only with controllers and views. There’s no restrictive naming conventions, or anything like that.

Secondly, the community is very active and helpful. Although I had a couple of minor issues throughout the development, the forum contained all the information I needed. I never had to ask a single question.

Lastly, Codeigniter has commercial backing in the shape of EllisLab. The future of Codeigniter looks really bright. In fact, 1.7 was released the day Toawema went live (thanks guys, it could’ve saved a ton of coding on the forms!)

Codeigniter is a fantastic product, and I can’t recommend it highly enough for anyone looking at PHP frameworks. I can’t wait to check out ExpressionEngine next!

Posted in PHP, jquery, web development at November 4th, 2008. 1 Comment.