![]() |
I am working on a prototype using Modules. Everything is working fine in xampp on my windows desktop. When I deploy it to my dedicated server, it cannot find the routes
Folder structure app Config Autoload Routes cits Blog Config Routes Controllers Blog FILES: app\Config\Routes ---------------------------------------------------------- service('auth')->routes($routes); $routes->get('/', 'Home::index'); app\Config\Autoload --------------------------------------------------------- public $psr4 = [ APP_NAMESPACE => APPPATH, 'Config' => APPPATH . 'Config', 'Cits\Settings' => ROOTPATH . 'cits\Settings', 'Cits\Blog' => ROOTPATH . 'cits\Blog', ]; \cits\Blog\Config\Routes --------------------------------------------------------- $routes->group("blog", ["namespace" => "\Cits\Blog\Controllers"], function ($routes) { $routes->get("/", "Blog::index"); }); Error I receive: Can't find a route for 'GET: blog'. Any idea why this is not working.
05-09-2025, 11:04 PM
(This post was last modified: 05-10-2025, 04:20 AM by InsiteFX. Edit Reason: Added slash examples )
Your Autoload is structure wrong look at your slash's and at mine below.
Namespaces use a \ back slash paths use a / forward slash. Check your Routes: PHP Code: php spark Routes PHP Code: app\Config\Autoload What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |