Reputation: 19347
Im trying to access my Yii code generator which is Gii. but when i browse it using
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...
Upvotes: 1
Views: 1603
Reputation: 2623
use this .htaccess:
RewriteEngine on
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward it to index.php
RewriteRule . index.php
and try your URL:
http://localhost/mysite/gii/index/
Upvotes: 0
Reputation: 19347
If you encounter the same problem with the same configuration I did use this URL http://localhost/mysite/gii/default/login
^_^
Upvotes: 1