CodeIgniter How to create Multiple Site with One CMS CodeIgniter How to create Multiple Site with One CMS codeigniter codeigniter

CodeIgniter How to create Multiple Site with One CMS


You can use the same CodeIgniter /System and /Application folders for all the websites if you like; just make sure all the index.php files are setup to use those same folders for $system_path and $application_folder respectively. Note that these sites also need to reside on the same server.

You can serve up different content by checking $_SERVER['HTTP_HOST'] for the domain the request came from.

As for htaccess you should be able to use %{HTTP_HOST}/$1 or %{HTTP_HOST}$1 (depending on server config) to make the rewrite rule dynamic.

I am actually building a similar project right now using CodeIgniter but there are also several other projects available like halogy, codefight, pyro (with an extension), and many others.


CodeIgniter has a System and an Application folder. You could have one global system folder and then one application folder for each of your subdomains, or you could have one application folder and just make your subdomian folders parallel with your www folder.