CodeIgniter with Multiple Sites |
10-13-2016, 12:17 AM
(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'; /home/cmihub/public_html/subdomains/accounts <- index.php and htaccess for accounts application PHP Code: $system_path = '../../../ci/system'; 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
|
Welcome Guest, Not a member yet? Register Sign In |