Welcome Guest, Not a member yet? Register   Sign In
Trying to wrap my head around multiple apps, one system folder

How do you guys do it?

Right now, I have a fairly nice install of CodeIgniter 2 where I separate the applications from the system folder. So I have a ci_apps folder and a ci_system folder.

But how do you guys manage the loading of these apps? I know the official docs say to rename index.php to whatever.php, and create copies of that.

For those of us that want clean URLs (with no .php extension in the url), I find this hard to accomplish.

First of all, I am using a url rewrite to "hide" index.php. So if someone goes to http://website.com/controller1/page1, that works instead of having index.php in there.

But now if I want to run my other app (whatever.php), I need to use http://website.com/whatever.php/controller1/page1. It works, but it's now impossible to remove .php using URL rewriting, because it somehow ends up thinking it's a controller for index.php.

Any idea how to get around this?

Why do you need multiple applications on the same website? The notion of controller certainly satisfies this requirement. Does it not?

If your purpose is to keep your entire codebase modular, the Modular Separation implementation is the preferred manner to go about it.

If you just need a way to reduce code for multiple virtual hosts (and possibly a way to store global libraries and helpers,) I had a lengthy discussion with another poster today on how you might set this up.

Theme © iAndrew 2016 - Forum software by © MyBB