CodeIgniter Forums
CodeIgniter with multiple subdomains - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Best Practices (https://forum.codeigniter.com/forumdisplay.php?fid=12)
+--- Thread: CodeIgniter with multiple subdomains (/showthread.php?tid=69706)



CodeIgniter with multiple subdomains - waqaskhanbhatti - 01-09-2018

Hi to all members,
I have a problem and hopefully we will solve it. The problem is,
I am creating an application this application has an “Admin Panel (Backend)” and Frontend.
The URL structure of the admin panel is like this
https://www.app-name.com/admin
For frontend I have a different URL structure which is based on country for example.
https://usa.app-name.com
https://ca.app-name.com
https://uk.app-name.com
https://uae.app-name.com
https://in.app-name.com
 
It means in frontend I have multiple sub-domains. And the all these sub-domains are sharing a single database. As well as, backend is also sharing the same database.
Now my problem is how can I handle front-end like this.
Possible one solution in my mind is to copy app to all the sub-domains and connect with single database. And for admin panel copy it at the main domain. But in this case, if I have a single modification to application I have to update all the copies. I want to use only single copy of app to handle all sub-domains. 
 
Anyone have some solution for this problem. Thanks


RE: CodeIgniter with multiple subdomains - Narf - 01-09-2018

Duplicate