How can I separate the frontend from the backend in CodeIgniter?

I’m a beginner PHP developer working on a website using CodeIgniter. I’ve encountered difficulties while setting up the backend. I’m utilizing a CMS backend that includes a dedicated folder containing all components like .htaccess and its own MVC structure. I organized all my frontend files into a folder named ‘frontend’ within the application directory. However, I am unable to access my frontend pages, and I receive an error message indicating that the configuration file is missing. Could you guide me through the necessary steps to resolve this issue?

If you’re experiencing issues accessing your frontend files, consider creating a subdomain for the frontend and setting up routes explicitly within your CodeIgniter configuration. This approach allows each part of the application to have distinct configurations and avoids potential routing conflicts. Ensure your base URL and database settings are appropriately configured in your ‘config.php’ and ‘database.php’ files. By keeping configurations separated, you can streamline development and maintainability across both the frontend and backend components of your site.

Hey, hope you’re hanging in there! Sometimes it’s just a simple path issue :sweat_smile:. Did you double-check the URL structure? Make sure the paths to your frontend assets are correctly defined in the base_url? Look into using asset helpers or check the .htaccess for redirection problems that might cause this.

Hey DancingButterfly! interesting issue, hmm :thinking:, if your CMS uses its own MVC, have you thought about the possibility of routing conflicts or your public path being misconfigured? What specific error msg are you seeing about the config file? Maybe others here have encountered this too and can chime in with more details!