Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter with Multiple Sites
#16

(This post was last modified: 10-13-2016, 12:37 AM by salain. Edit Reason: missing information )

Is the last error is for the main application ?

What is the  complete folder structure for each application?
You should have your Ci system and applications above the root folder for better security.

So lets take this as your root folder /home/cmihub/public_html/

to keep it nice and tidy

/home/cmihub/ci  <- all CodeIgniter files
/home/cmihub/ci/system  <- CodeIgniter system folder & sub-folder
/home/cmihub/ci/main  <- Copy of CodeIgniter application folder for the main application
/home/cmihub/ci/accounts  <- Another copy of CodeIgniter application folder for the sub-domain application

/home/cmihub/public_html/  <- index.php and htaccess for main application

PHP Code:
$system_path '../ci/system';
$application_folder '../ci/main'


/home/cmihub/public_html/subdomains/accounts  <- index.php and htaccess for accounts application

PHP Code:
$system_path '../../../ci/system';
$application_folder '../../../ci/accounts'

The htaccess can be the same for both domain

with this you should be able to access your applications with

http://www.domain.com/   <- Main application
http://accounts.domain.com/  <- Accounts application

providing the sub-domain has been set up for accounts it should work.

If the sub-domain does not work access it with the folder
http://www.domain.com/subdomains/accounts
A good decision is based on knowledge and not on numbers. - Plato

Reply


Messages In This Thread
CodeIgniter with Multiple Sites - by demonicinn - 10-09-2016, 10:02 PM
RE: CodeIgniter with Multiple Sites - by Wouter60 - 10-10-2016, 01:10 PM
RE: CodeIgniter with Multiple Sites - by suhindra - 10-10-2016, 11:46 PM
RE: CodeIgniter with Multiple Sites - by suhindra - 10-11-2016, 02:04 AM
RE: CodeIgniter with Multiple Sites - by salain - 10-12-2016, 02:49 AM
RE: CodeIgniter with Multiple Sites - by salain - 10-12-2016, 06:33 AM
RE: CodeIgniter with Multiple Sites - by salain - 10-12-2016, 10:16 PM
RE: CodeIgniter with Multiple Sites - by salain - 10-13-2016, 12:17 AM
RE: CodeIgniter with Multiple Sites - by salain - 10-13-2016, 12:57 AM



Theme © iAndrew 2016 - Forum software by © MyBB