How to change articles/view/slug to articles/slug in CakePHP with Routing
I would like to have a route setup on my CakePHP app that will accomplish the following:
- I have my app setup to use Slugs that usually generate addresses as
http://www.domain.com/articles/view/my-favorite-cakephp-application
- However, I would like the address to display as
http://www.domain.com/articles/my-favorite-cakephp-application
How can I accomplish开发者_如何学C that using routes.
Thank you!
in routes.php
Router::connect( '/articles/*', array('controller' => 'articles', 'action' => 'view') );
精彩评论