Skip to content

Controller in folder - method not accessible unless I set a route on Linux - Windows OK  #1841

Description

@daljit3

I have got a test site setup on my local Windows system and same site uploaded on a server with Ubuntu.

On my local - URLs mysite/admin/home/upload and mysite/admin/upload both work fine.

However, on my Ubuntu server, mysite/admin/home/upload throws up 404 error saying Controller or its method is not found: App\Controllers\Admin::home [i.e. its looking for an admin controller and it's home method rather than Home controller in an admin folder]
I don't have any issues with mysite/admin/upload as I believe the route below is parsing correctly.

What's going wrong here? Here are my routes.

$routes->setAutoRoute(true);

$routes->group('admin', ['namespace' => 'App\Controllers\admin'], function($routes)
{
    $routes->add('/', 'Home::index', ['as' => 'admin.home']);
    $routes->add('upload', 'Home::upload', ['as' => 'admin.upload']);
});

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions