开发者

Admin routing, http://website.com/admin won't go to posts/admin_index

I have admin routing enabled. How can I set routing, to make http://website.com/admin go to posts/admin_index?

I've got this:

Router::connect('/', array('controller' => 'posts', 'action' => 'index')开发者_运维知识库);

But it doesn't seem to work. I get this error (when going to http://website.com/admin):

Missing Controller

Error: Controller could not be found.

Error: Create the class Controller below in file: app/controllers/controller.php

<?php
class Controller extends AppController {

    var $name = '';
}
?>


Try a route with:

Router::connect('/admin', array('controller' => 'posts', 'action' => 'index', 'admin' => true));

The default route '/' does not match the URL '/admin', admin routing enabled or not.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜