0

I have built admin of my cakephp site using prefix 'webadmin'. Now I need to change this to something like 'aRRT6nnf'.

I changed the admin prefix in core.php, routes.php and even changes the filenames in views folder but this gives the following error:

Error: The requested address '/aRRT6nnf' was not found on this server.

I made following changes to accomplish this:

//core.php
Configure::write('Routing.prefixes', array('aRRT6nnf'));

//routes.php
Router::connect('/aRRT6nnf', array('controller' => 'dashboard', 'action' => 'index', 'prefix'=>'aRRT6nnf', 'aRRT6nnf'=>true));

Any help would be appreciated.

4

1 回答 1

1

您是否更改了控制器方法的前缀

在 Cake 1.3 中使用管理路由时,您的控制器操作需要以它们所属的路由作为前缀,例如采取路由admin您的仪表板控制器应该是这样的

class DashboardController extends AppController
{

    public admin_index() {

    }

因此,在您的特定情况下,您需要将它们更改为

public aRRT6nnf_index() {

}
于 2013-05-22T11:50:04.750 回答