Welcome Guest, Not a member yet? Register   Sign In
Can't get rid of routing to "public"

While you have made the necessary changes to the document root and the baseURL configuration, you're facing a "404 Can't find a route for 'get: public'" error when accessing mysite.com. Additionally, the URL in the browser address bar still displays mysite.com/public despite the modifications you made.

Here are a few suggestions to help you troubleshoot the problem:

Double-check your changes: Review the modifications you made to the document root and the baseURL in both the .env file and the app/Config/App.php file. Ensure that you have removed "public" from the baseURL and that you have included the trailing slash correctly.

Verify server configuration: Confirm that the changes to the document root have been applied correctly on your server. Check the server configuration files (e.g., Apache's httpd.conf or Nginx's site configuration) to ensure that the document root is pointing to the correct folder.

Clear cache and temporary files: Clearing the browser cache is a good step, but make sure you have cleared any server-side cache as well. If you are using any caching mechanisms like OpCode cache or a reverse proxy, clear those caches too.

Check .htaccess file: Make sure your .htaccess file is properly configured to remove the "index.php" from the URLs. This file should be in the root folder of your CodeIgniter installation.

Verify file/folder permissions: Ensure that the file and folder permissions are correctly set for your CI and Bonfire installation. The necessary files and directories should have appropriate read and execute permissions for the webserver.

Investigate the routing: Check your routes configuration in the app/Config/Routes.php file. Verify that there are no conflicting or incorrect route definitions that might be causing the issue.

Debugging and logging: Enable debugging mode in CodeIgniter's environment configuration (app/Config/ENVIRONMENT.php) to get more detailed error messages. Also, check the application logs to see if any errors or warnings are being logged.

If you've gone through these steps and the issue persists, it might be helpful to consult the CodeIgniter and Bonfire communities for further assistance. Providing them with specific details about your environment, server configuration, and any relevant error logs will help them understand the issue better and provide targeted support.

Messages In This Thread
RE: Can't get rid of routing to "public" - by HimesTimmerla - 05-29-2023, 04:28 AM

Theme © iAndrew 2016 - Forum software by © MyBB