Page 1 of 1

Route "index.php" not found (IIS)

Posted: Mon Feb 19, 2024 3:35 am
by andisstrods

[2024-02-18T19:26:14.911354+00:00] log.ERROR: 404 Not Found Type: Slim\Exception\HttpNotFoundException Code: 404 Message: Route 'index.php' not found. File: C:\inetpub\wwwroot\leavers\src\routes.php Line: 22

Project generation runs with no issues, all files created however nothing launches on the web apart from 404 error. Error log from phpmaker creates similar to the above. Any advices?


Re: Route "index.php" not found

Posted: Mon Feb 19, 2024 8:41 am
by arbei

With routing there is no need to use ".php" in the URL, you may just use "/" or "/index". If you have any code using "index.php", you should update it. There is no need to enter "index.php" as the Start Page.


Re: Route "index.php" not found

Posted: Tue Feb 20, 2024 12:32 am
by andisstrods

Good point however without index.php nothing loads either.

URL http://localhost/leavers/Dashboard2List gives below error:

HTTP Error 404.0 - Not Found
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

Detailed Error Information:
Module IIS Web Core
Notification MapRequestHandler
Handler StaticFile
Error Code 0x80070002
Requested URL http://localhost:80/leavers/Dashboard2List
Physical Path C:\inetpub\wwwroot\leavers\Dashboard2List
Logon Method Anonymous
Logon User Anonymous

There must be something trivial that is missed. If any of the experts could advise, thank you and much appreciated


Re: Route "index.php" not found

Posted: Tue Feb 20, 2024 9:35 am
by arbei

Make sure you have set up URL Rewrite for your IIS properly.