Codeigniter Folder Structure For CMS |
In the end, you can make almost any directory structure work if you really want to and have time to work it out. However, I prefer a structure like this:
Code: - /website/ In most cases, I don't need a completely separate website, and many of my assets and much of the application code would be shared, so I would just create the 'admin' site within the 'public' site, using code to control access to the 'admin' site. If I wanted to add a second website with completely different application code and assets (CSS/JS/etc.), I could add another application directory and another DocumentRoot directory (e.g. 'admin'), but use the same system directory. This also works well if you want to use Apache to manage authentication and authorization, and makes it easier to host the two on separate subdomains, as the DocumentRoot of each subdomain would be set to the appropriate directory. You stated that in WAMP you access the site like this: Quote:localhost/mycms/public (For public View) To me, this implies that the DocumentRoot in WAMP is set to the directory above the 'mycms' directory, rather than having separate websites configured in WAMP with the DocumentRoot set to /mycms/public and /mycms/admin. However, this may just reflect some incorrect assumptions. I'm assuming that you would want to do something like this: http://testing.website.com - points to /mycms/public https://admin.website.com - points to /mycms/admin However, if you wanted to do something like this: http://testing.website.com - points to /mycms/public https://testing.website.com/admin - points to /mycms/admin Then you're back to having one site, with 'admin' existing inside the 'public' site. It's probably possible to do something creative in .htaccess or the apache conf files to route requests from /admin to the 'admin' site without a redirect, but it's not something I've attempted. |
Messages In This Thread |
Codeigniter Folder Structure For CMS - by codeigniterd - 04-21-2016, 09:54 PM
RE: Codeigniter Folder Structure For CMS - by dmyers - 04-22-2016, 06:02 AM
RE: Codeigniter Folder Structure For CMS - by codeigniterd - 04-26-2016, 10:28 AM
RE: Codeigniter Folder Structure For CMS - by mwhitney - 04-27-2016, 07:41 AM
|