Skip to content

Instantly share code, notes, and snippets.

@ichadhr
Last active February 19, 2017 19:15
Show Gist options
  • Save ichadhr/7fddcd6ff118a2d196ed6e4640b60991 to your computer and use it in GitHub Desktop.
Save ichadhr/7fddcd6ff118a2d196ed6e4640b60991 to your computer and use it in GitHub Desktop.
Multiple CI

Setting up one codeigniter for multiple site:

example root folder: /home/myweb/public_html/

to keep it nice and tidy

/home/myweb/ci [all codeigniter files]

/home/myweb/ci/system [codeigniter system folder & sub-folder]

/home/myweb/ci/main [copy of codeigniter /application folder for the main application]

/home/myweb/ci/other [another copy of codeigniter /application folder for the other application]

/home/myweb/public_html/index.php [for the main application]

$system_path = '../ci/system';
$application_folder = '../ci/main';

/home/myweb/public_html/subdomain/index.php [for the other application]

$system_path = '../../ci/system';
$application_folder = '../../ci/other';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment