Thank you for your explanation.
I followed your suggestion and registered only one main route while handling $_GET['act'] inside index.php.
My modules/stats/config/routes.php currently contains:
<?php
declare(strict_types=1);
use Johncms\Router\RouteCollection;
use Johncms\System\Users\User;
return static function (RouteCollection $router, User $user): void {
$router->map(
['GET', 'POST'],
'/stats',
'modules/stats/index.php'
);
};
However, when I open:
/stats
or
/stats/?act=browser
I still get a 404 Not Found error.
Am I missing something? Is there any additional configuration required to make a legacy module with index.php work in JohnCMS 9.9?
Thank you very much for your help.