phpyiigiiyii-routing

Error in Gii Code Generator Page


Im trying to access my Yii code generator which is Gii. but when i browse it using

http://localhost/mysite/gii/index/

the page says

Error 404 Unable to resolve the request "gii/index".

this is my .htaccess file for url-rewriting

Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . index.php

and this is my url manager in my config file

    'urlManager'=>array(
        'urlFormat'=>'path',
        'rules'=>array(
            '<controller:\w+>/<id:\d+>'=>'<controller>/view',
            '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
            '<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
        //pages
        '<view>'=>array('site/page'),
        ),
    ),

did i went wrong on something? the http://localhost/mysite/gii/index/ shows the layout of the gii code generator but showing the Error 404...

thanks

P.S. I tried also to turn off my URL manager and see if my Gii code generator page will work by default by using this url http://localhost/mysite/index.php?r=gii/default/login and it works...


Solution

  • If you encounter the same problem with the same configuration I did use this URL http://localhost/mysite/gii/default/login

    ^_^