CodeIgniter Forums

Full Version: Subdirectory installation and setup question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]Rob Rightmyer[/eluser]
I'm a PHP guy that is brand new to frameworks and CodeIgniter.

Currently a section of my site is displaying handcoded PHP pages like this:

I also have an admin area to control content for this section like this:

I would like to utilize CodeIgniter to replace my current setup ONLY for this section as I do not want to interfere with the other static pages on my website. What would be the best practice for accomplishing this setup?

Do I (1) install CI in my webroot and then use .htaccess to specify access to this section or (2) install CI in the section I want to replace?

I've tried option (2) but can't seem to get things flowing the way I want. Not sure I understand how to accomplish the first option but this sounds like the proper method. Again it is important to mention I don't want to interfere with the rest of my static pages at this time.

Thanks for listening!

El Forum

If you can use mod_rewrite than you can easily have a ci setup and static files mixed up. Be sure to use these conditions

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

El Forum

I think you could install CI in the admin folder and run it as usually.

El Forum

[eluser]Rob Rightmyer[/eluser]
Thanks everyone for your replies.

After a few different trials and errors, my problem came down to the syntax in my .htaccess file. Because my CI install was in a subdirectory of my webroot, it was necessary for me to make the following adjustment to make my links work correctly: