odan / slim4-skeleton

A Slim 4 Skeleton
https://odan.github.io/slim4-skeleton/
MIT License
449 stars 80 forks source link

Error 404 in RoutingMiddleware #133

Closed glewe closed 2 months ago

glewe commented 2 months ago

Hi there,

after the installation as per documentation, when using composer start I can see the proper Welcome page at localhost:8080.

However, when I use my local XAMPP Apache server and navigate to the installation public folder (e.g. http://localhost/slim4/public) I get a 404 error:

Error 404 (Not Found)
Message: Not found.
File: D:\Web\htdocs\slim4\vendor\slim\slim\Slim\Middleware\RoutingMiddleware.php, Line: 76

Any idea why that is?

Best regards, George

odan commented 2 months ago

The reason is that public/ should be the document root in Apache. So try to remove public from the url path.

glewe commented 2 months ago

That was it. Sorry for that. Could have tried that myself. Thanks and best regards, George