how to remove action name from URL in cakephp2

前端 未结 5 1183
终归单人心
终归单人心 2021-01-17 04:44

may be duplicate but I don\'t get any proper answer or help

actually I want to do like:

my current URL is : http://mysite.com/MyController/view/page1

5条回答
  •  太阳男子
    2021-01-17 05:04

    use

    Router::connect('/MyController/:id', array('controller' => 'MyController','action' => 'view'),array('id' => '[0-9]+'));
    

提交回复
热议问题