1

Admin plugin / PagesController methods:

  • home
  • index
  • add
  • ..

removed default display method.

Problem, i can't access url without slash at end mysite.com/admin/pages , if i try get redirect to mysite.com/admin/webroot/pages and error message

Error: WebrootController could not be found.

For all other Controllers url without slash at end works.

Router in admin plugin / config:

Router::plugin('Admin', function ($routes) {
    $routes->connect('/login', ['controller' => 'Users', 'action' => 'login']);
    $routes->connect('/new-password', ['controller' => 'Users', 'action' => 'newPassword']);
    $routes->connect('/reset-password', ['controller' => 'Users', 'action' => 'resetPassword']);
    //$routes->connect('/pages', ['controller' => 'Pages', 'action' => 'index']);
    $routes->connect('/', ['controller' => 'Pages', 'action' => 'home']);
    $routes->fallbacks('DashedRoute');
});
Salines
  • 5,674
  • 3
  • 25
  • 50

1 Answers1

0

This thread on github may help you.

For what I know, the only way is to set the document root to /webroot

For anyone interested on changing the document root for the primary domain on cPanel: check here

Tomas Gonzalez
  • 1,124
  • 15
  • 33