I have a small site based on Zend Framework 2.3 that runs on OS X with OS X Server. I need to do some development so I've copied it onto a Debian 7 system. Apart from the database definitions, the code is identical on both machines. The Linux-based system works for most functions but one results in a 404 error and I can't see why this should be. The module.config.php is array ( 'invokables' => array ( 'LibraryRest\Controller\AuthorRest' => 'LibraryRest\Controller\AuthorRestController', 'LibraryRest\Controller\BookTitleRest' => 'LibraryRest\Controller\BookTitleRestController', 'LibraryRest\Controller\RecentRest' => 'LibraryRest\Controller\RecentRestController' ), 'factories' => array ( 'LibraryRest\Controller\SearchRest' => 'LibraryRest\Factory\SearchRestControllerFactory' ) ), 'router' => array ( 'routes' => array (
'author-rest' => array (
'type' => 'Segment',
'options' => array (
// Change this to something specific to your module
'route' => '/author-rest[/:id]',
'constraints' => array (
'id' => '[0-9]+'
),
'defaults' => array (
'controller' => 'LibraryRest\Controller\AuthorRest'
)
)
)
,
'booktitle-rest' => array (
'type' => 'Segment',
'options' => array (
'route' => '/booktitle-rest[/:id]',
'constraints' => array (
'id' => '[0-9]+'
),
'defaults' => array (
'controller' => 'LibraryRest\Controller\BookTitleRest'
)
)
),
'recent-rest' => array (
'type' => 'Segment',
'options' => array (
'route' => '/recent-rest',
'defaults' => array (
'controller' => 'LibraryRest\Controller\RecentRest'
)
)
),
'search-rest' => array (
'type' => 'Segment',
'options' => array (
'route' => '/search-rest[/:action[/:first][/:last]]',
'constraints' => array (
'first' => '[a-zA-Z0-9_-\s\x40%\.]*',
'last' => '[a-zA-Z0-9_-\s\x40%]*',
'action' => '[a-zA-Z][a-zA-Z0-9_-]*'
),
'defaults' => array (
'controller' => 'LibraryRest\Controller\SearchRest'
)
)
)
)
),
'view_manager' => array (
'strategies' => array (
'ViewJsonStrategy'
)
)
); The route that fails on the linux machine is search-rest, so http://mysite/search-rest/search/John/Smith results in a 404. All the other routes in this module work correctly on both systems.
What might be causing the routing to fail on the Linux system?