RSS

Moving the system folder in CodeIgniter

Wed, Jul 9, 2008

CodeIgniter

It’s the first real night of actual work on the app, and already I’ve run into my first gotcha!

For security reasons I decided to move the /system folder - which contains everything needed to run an application on CodeIgniter apart from the index.php file - outside of the web root. This is easily accomplished by changing the $system_folder path in the aforementioned index.php file… but then everything stopped working.

Five minutes of head-scratching later, I figured out what I had done.

Because I’m working on my local development machine, instead of moving the /system folder up a level, I actually moved the index.php down a level - and I’d forgotten to move the .htaccess file along with it, so Apache was dutifully trying to rewrite every request to a non-existent file.

Stupid mistake, easy fix.

, , , ,

This post was written by:

Matthew Pennell - who has written 11 posts on Add It Up Development Blog.

Writer, designer, programmer, renaissance geek.

Contact the author

2 Comments For This Post

  1. Peter Says:

    Working on the app already..?

    I had a major laugh in regard to your project to list:

    * Set up development blog
    * Design logo
    * Build app

    Just the way I work on personal projects, even though I don’t like to do it this way… even when writing papers I still do ye old high school approach: nice front page, title-finding … header and footer design. Last night before deadline: write goddamn essay.

    Anyway - just though it was a fun todo list.

  2. Matthew Says:

    Thanks, Peter - to be honest, I actually develop more like a programmer. Non-existent interface design, Times New Roman and nasty table borders are the order of the day at this stage! :)

Leave a Reply