我打開urlManager之前,寫了規則的GII-發電機曾在訪問發電機GII,Yii2
主機名/的index.php?R = GII
在那之後,我轉身對urlManager主機名/ gii不起作用 也許是他寫規則?但是如何? 選項
'GII'=> 'GII' 或 'GII'=> 'GII /指數',
不工作
'urlManager' => [
'enablePrettyUrl' => true,
'showScriptName' => false,
'rules' => [
'/' => 'site/index',
'about' => 'site/about',
'contact' => 'site/contact',
'login' => 'site/login',
'entry' => 'site/entry',
'gii' => 'gii',
'country/page/<page:\d+>' => 'country/index',
],
],
你開啓可以參考[在URLManager中使用漂亮的URL](http://www.yiiframework.com/doc-2.0/guide-runtime-routing.html#using-pretty-urls)與[Web服務器配置](http://www.yiiframework.com/doc-2.0/guide-start-installation.html#recommended-apache-configuration)。 –
更新您的問題並顯示您的urlManager配置..請 – scaisEdge