1
votes

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');
});
1
Do you by chance have folder named "page" in your webroot directory? - ADmad
No, only standard folders - Salines
Sounds like a web server configuration issue to me. Such as in Apache it thinks that without a -d or -f switch it's a file or folder. - David Yell
Try adding Options -MultiViews to your webroot/.htaccess. - ADmad

1 Answers

0
votes

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