Reputation: 31337
Trying to access locally http://mysite.dev/gii but I'm getting:
Gii Unable to resolve the request "gii/index"
Here is my config/localdev.php file:
'modules'=>array(
// uncomment the following to enable the Gii tool
'gii'=>array(
'class'=>'system.gii.GiiModule',
'password'=>false,
// If removed, Gii defaults to localhost only.
'ipFilters'=>array('127.0.0.1','::1'),
),
If I use this address:
http://mysite.dev/gii/default/login
But this a password protect one, and we defined as false. We may think that localdev.php is NOT being applied, but I've echo "hello" inside the conditional that loads it, and it appeared".
Note: Inside Yii framework there is a .htaccess file with:
deny from all
I don't see the reason for this behavior.
Can I have your help please ?
Update regarding the comments:
Here's the localdev.php requiring main.php
return CMap::mergeArray(
require_once(dirname(__FILE__).'/main.php'),
array(
'modules'=>array(
'gii'=>array(
'class'=>'system.gii.GiiModule',
'password'=>false,
'ipFilters'=>array('127.0.0.1','::1'),
),
),
Here's the URL on main.php
'components'=>array(
'urlManager'=>array(
'urlFormat'=>'path',
'rules'=>array(
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>'=>'<controller>/index',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>'
),
'showScriptName'=>false,
),
IF we should add those:
'rules'=>array(
'gii'=>'gii',
'gii/<controller:\w+>'=>'gii/<controller>',
'gii/<controller:\w+>/<action:\w+>'=>'gii/<controller>/<action>',
Should I add this and place all that it's on main.php rules OR, can we precisely add just those rules here on localdev.php ?
Upvotes: 1
Views: 3654