Hi,
since dynamic routes are not allowed in ci4, i try to setup the autorouting (improved) to get nearly the same situation like the ci3 dynamic routes ( i cannot and wont define for every controller own static routes).
So like the docu i do the following steps.
1) App/Routing
Code:
public bool $autoRoute = true;
2) App/Feauture
Code:
public bool $autoRoutesImproved = true;
3) App/Routes.php
Code:
//$routes->get('/', 'Home::index'); //Disabled because autorouting!
//$routes->get('mysubfolder/', '\App\Controllers\mysubfolder\mycontroller::index');//Disabled because autorouting!
also i have overwrite the 404error
//Error 404
Code:
$routes->set404Override(function(){ die("test routes set404 > STOPP >".$_SERVER['HTTP_HOST'].' '.$_SERVER['REQUEST_URI']); } );
If i understand it corretly, autorouting only works if there is no single static rule for the controller defined in Routes.php.
(I use the shield-authentification, maybe its important to notice, or not.)
After i do the changes, no page is avivable anymore. I only get my 404-error "test routes set404..."
Before i change it all pages will shows as they should. Now nothing works...
What i do wrong?