routes - Zend routing (default controller to handle all url) -


at first sorry poor english. want handle requests not match routes custompagecontroller.

i trying configure module.config.php this:

'defaults' => array(                     'type' => 'zend\mvc\router\http\literal',                     'options' => array(                         'route' => '/*', // or 'route' => '/user*' example, handling www.site.com/user4 (just example)                         'defaults' => array(                             'controller' => 'custom_page',                             'action' => 'index',                         ),                     ),                 ), 

to handle queries not match routes must redirect last "defaults" route. not working.

you can use errorcontroller alternative this. if controller name not found error code 500. can whatever want on controller (re-route custompagecontroller)


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -