Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter 2.0 and move the app out of docroot
#1

[eluser]searain[/eluser]
http://codeigniter.com/wiki/Moving_your_...f_DOCROOT/

I followed this instruction and moved the app out of docroot on codeigniter 1.7.2.

But when I followed the instruction to move the app out of docroot on CI 2.0, I got error message. So I set up the application like the following
//$application_folder = "application"; //original value
$application_folder = "../application"; //my reset value

It seems working.

My questions are:

1) what else I should know about move the app out off docroot on CI 2.0?
2) if it is just two lines changes in index.html, why not CI 2.0 make the app out of doc root as default? it is a little more secure. What is the disadvantage to move the app out of doc root, if any?

Thanks!
#2

[eluser]WanWizard[/eluser]
In CI 1.7.2 the application folder is inside the system folder. So if you move the system folder (as per the wiki instructions), you move application as well.

In CI 2.0, the application folder is in the docroot, at the same level as the system folder. So if you move the system folder, the application folder isn't moved. So you have to modify that path as well, as you correctly discovered.

As to the default location, it is virtually impossible to come up with a distribution file structure that will suit everyone. For my servers, moving the system and application directory one up is useless, I will end up on a different filesystem.




Theme © iAndrew 2016 - Forum software by © MyBB