I’ve been using Slim routes for a while now and never had an issue with a route not being matched/resolved. However, I’ve been banging my head against this one for a few hours now and I’m just not seeing what I’m doing wrong. Maybe someone here has an idea:
My route definition:
$app->get ('/test/execSql/{id}', 'App\Controller\TestController:execSql')->setName('test_execSql');
The URL for this route is generated like this:
$request = $app->getContainer()->get("request");
$router = $app->getContainer()->get("router");
$url = (string)($request->getUri()->withPath($router->pathFor('test_execSql', [ 'id'=> $k ])));
When I click on that link it takes me to the following (seemingly correct) page:
http://localhost/MyProject/web/test/execSql/1
But the error message I’m getting is this:
The requested URL /Exchange/web/test.html/execSql/1 was not found on this server.
I’m not sure if the “test.html” is by design or points to some error. Like I said above, the URL seems to be generated correctly but it’s not resolved correctly.
Any ideas what might be causing this?