• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Codeigniter Folder Structure For CMS

Below Image showing the folder structure for my CMS website. It it okay or i have to make some suitable changes to make website well structured.
Thanks in advance. Ideas acceptable.

Attached Files Thumbnail(s)

Why do you have a system_back and system_front folder? You shouldn't be modifying any files in the CodeIgniter System folder? That should be the same for both application_front and application_back.

Also if you can make a web folder above that folder say "public" or something and make that your web root. You could put index.php in there and "protect" all of the other files from direct access.


Attached Files Thumbnail(s)

I have attached an image of my codeigniter folder structure. When in wamp it is working fine. But in Subdomain. It is not working at all.

In wamp i am running code like this
localhost/mycms/public (For public View)
localhost/mycms/admin (For AdminView)

But in Subdomain testing.website.com pointing at Document_Root/mycms/public it is working fine.
But In case of Admin it is not working !!

 As i am learning Can i Get a suitable suggestion how Do i Place the folder at right place to do the project correctly.

Thanks in Advance  !! Huh

Attached Files Thumbnail(s)

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:

- /website/
  - application/
  - system/
  - other/
  - public/
    - assets/
      - css/
      - files/
      - fonts/
      - images/
      - js/
    - .htaccess
    - index.php
In this case, /website/public is my DocumentRoot in Apache.

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)
localhost/mycms/admin (For AdminView)

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.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.