开发者

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') );

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜