Within the CodeIgniter, there are two main directories to worry about: system and application. The system folder contains the core guts of CodeIgniter. The application folder will contain all of the code specific to your application, including models, controllers, views and other relevant libraries.
Per the CodeIgniter installation instructions, in the best interest of securing your application, both the system and application folder should be placed above web root so that they are not directly accessible via a browser. By default, .htaccess files are included in each folder to help prevent direct access, but it is best to remove them from public access entirely in case the web server configuration changes or doesn't abide by the .htaccess.
├── CodeIgniter
│ ├── application
│ ├── system
│ ├── wwwroot
│ │ ├── index.php
After moving the system and application folders, open the main index.php
file and set the $system_path
, $application_folder
variables, preferably with a full path, e.g. ‘/www/MyUser/system‘
. However, relative paths should work.
For Linux/Apache:
$application_folder = './application';
$system_path = './system';
For Windows/IIS:
$application_folder = '../application/';
$system_path = '../system/';