CodeIgniter with Multiple Sites - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Choosing CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=8) +--- Thread: CodeIgniter with Multiple Sites (/showthread.php?tid=66327) Pages:
1
2
|
CodeIgniter with Multiple Sites - demonicinn - 10-09-2016 Hello is anyone help me for multiple website in CI, using 1 CI installation, domain and sub-domains with same db. RE: CodeIgniter with Multiple Sites - Wouter60 - 10-10-2016 Didn't you find the answer here? http://www.codeigniter.com/userguide3/general/managing_apps.html RE: CodeIgniter with Multiple Sites - demonicinn - 10-10-2016 yes i read this article this article says like this create main domain and other sub-domains structure applications/foo/ applications/foo/config/ applications/foo/controllers/ applications/foo/libraries/ applications/foo/models/ applications/foo/views/ applications/bar/ applications/bar/config/ applications/bar/controllers/ applications/bar/libraries/ applications/bar/models/ applications/bar/views/ but index.php file calls only one folder like $application_folder = 'applications/foo'; when i use sub-domain of "bar" folder then how to use this one http://bar.domainname.com this index.php file error because in this "bar" calls "foo" ?? please help me here RE: CodeIgniter with Multiple Sites - suhindra - 10-10-2016 I found a explained 3 approaches to get it done. https://philsturgeon.uk/codeigniter/2009/07/08/Create-an-Admin-panel-with-CodeIgniter/ RE: CodeIgniter with Multiple Sites - demonicinn - 10-11-2016 yes i got it its to easy to understand and my subdomains are working with different files. thanks for help. kind regards gurpreet RE: CodeIgniter with Multiple Sites - suhindra - 10-11-2016 welcome RE: CodeIgniter with Multiple Sites - demonicinn - 10-11-2016 sir i have changed in the application folder like application/foo/ application/foo/config/ application/foo/controllers/ application/foo/libraries/ application/foo/models/ application/foo/views/ application/bar/ application/bar/config/ application/bar/controllers/ application/bar/libraries/ application/bar/models/ application/bar/views/ index.php $application_folder = "applications/foo"; bar/index.php $application_folder = "applications/bar"; I'm using the "foo" and "bar" as sub-domains so my url are looking as http://foo.domain.com/ http://bar.domain.com/ when i used main index.php to change "$application_folder = 'application/foo';" then it also calls bar folder, but if i removed this "$application_folder = 'application/foo';" then gives an error. and it also not calls bar/index.php file. bar/index.php $application_folder = "applications/bar"; here I'm confused how to open bar folder files because bar/index.php not working and I'm using the CI version 3.1.0 RE: CodeIgniter with Multiple Sites - salain - 10-12-2016 Have you configure the DNS zone for your sub-domain ? You need to make foo and bar sub-domain in your dns foo would point to your main domain root folder bar would be a sub-domain in a folder under your root like "public_html/bar" You don't really need foo as a sub-domain since the index for that application is in your main domain http://www.domain.com/ will open the foo application as it is set in the index file. RE: CodeIgniter with Multiple Sites - demonicinn - 10-12-2016 I'm creating the new sub-domain "public_html/subdomains/accounts" and open this "http://accounts.domain.com/" I'm also copy the index.php file and changed subdomains/accounts/index.php $application_folder = "subdomains/accounts"; also insert the files subdomains/accounts/ subdomains/accounts/config/ subdomains/accounts/controllers/ subdomains/accounts/libraries/ subdomains/accounts/models/ subdomains/accounts/views/ but it gives an error Forbidden You don't have permission to access / on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. RE: CodeIgniter with Multiple Sites - salain - 10-12-2016 What do you get if you use: http://accounts.domain.com/index.php ? if this works it is because you need to copy the .htaccess file in the sub-folder with your index file. |