Simple subdomains handler for CI3 |
04-04-2016, 06:24 AM
(This post was last modified: 04-04-2016, 10:05 AM by josepostiga. Edit Reason: Added validation warning )
Hey guys. Just wanted to share some useful knowledge on how to detect, and use, multi app system detection for CI3. It's pretty simple and straight-forward.
Edit your root index.php. On the line where we define the $application var (default index.php set this to application), replace it with this: PHP Code: // checks domain I use this to handle my SaaS apps, where I can map specific subdomains to different application's folders or use the default one to handle the customer specific application. Please note that you should have some kind of validation for the subdomains you use here. See below for more details (thanks @albertleao). This is probably one of many ways to do it. If you have done it differently, please share here!
Best regards,
José Postiga Senior Backend Developer |
Messages In This Thread |
Simple subdomains handler for CI3 - by josepostiga - 04-04-2016, 06:24 AM
RE: Simple subdomains handler for CI3 - by albertleao - 04-04-2016, 08:14 AM
RE: Simple subdomains handler for CI3 - by josepostiga - 04-04-2016, 08:26 AM
RE: Simple subdomains handler for CI3 - by albertleao - 04-04-2016, 08:48 AM
RE: Simple subdomains handler for CI3 - by josepostiga - 04-04-2016, 09:03 AM
RE: Simple subdomains handler for CI3 - by albertleao - 04-04-2016, 09:59 AM
RE: Simple subdomains handler for CI3 - by albertleao - 04-04-2016, 10:03 AM
RE: Simple subdomains handler for CI3 - by josepostiga - 04-04-2016, 10:08 AM
|