2011-12-10 21 views

回答

3

看看關於網址管理的文檔:

不知道在您的protected/config/main.php(如果main.php是你的應用程序配置文件),您將您的設置,細節需要沿此:

// note: this is extracted from a project which uses 'friedly urls', 
//  depending on your setup, YMMV 
'urlManager'=>array(
    'urlFormat'=>'path', 
    'showScriptName' => false, 
    'rules'=>array(
     '<controller:\w+>/<id:\d+>'=>'<controller>/view', 
     '/admin'=>'/backend', // <-- define your custom routes/redirects here 
    ), 
), 
相關問題