NOTE: Adding previous comment as answer
This is the correct behavior. The URI passed to the router when you type http://localhost/index.php
contains "index.php"
.
Since there is no route matching "index.php"
, a 404 error is displayed by Zend Framework 2.
When using "/"
or "/index.php/"
, the path matched by the router is empty, so you get the default "home"
route of the ZendSkeletonApplication is matched.