how to remove action name from URL in cakephp2

前端 未结 5 1216
终归单人心
终归单人心 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条回答
  •  旧时难觅i
    2021-01-17 05:02

    use this code

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

提交回复
热议问题