Zend Framework 2 – routing & problem

,

Routing : http://framework.zend.com/manual/2.0/en/modules/zend.mvc.routing.html

http://zf-tutorial/album/add – 200 – works fine
http://zf-tutorial/album/add/ – 404 – The requested URL could not be matched by routing.

To handle that, just add the empty “/” in the end of route segment :

‘route’ => ‘/[:controller[/[:action[/]]]]’,

Or for “:slug” segment :

‘route’ => ‘/[:controller[/[:action[/[:slug[/]]]]]]’,

http://samsonasik.wordpress.com/2012/07/24/zend-framework-2-trailing-slash/

Blogbook : PHP | Javascript | Laravel | Corcel | CodeIgniter | VueJs | ReactJs | WordPress