Gii代码生成器错误页
问题描述:
我试图访问我的Yii代码生成器是Gii。 但是当我浏览它使用Gii代码生成器错误页
页说
错误404 无法解析请求 “GII /索引”。
这是我的URL重写.htaccess文件
Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
,这是我的网址经理,我的配置文件
'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'),
),
),
我做了错误的东西? 的http://localhost/mysite/gii/index/显示GII码发生器,但是示出了错误404的
感谢布局...
P.S. 我想也关掉我的网址管理器,看看如果我的GII代码生成页面将默认工作通过使用这个网址http://localhost/mysite/index.php?r=gii/default/login 和它的作品...
答
利用这个的.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
并尝试你的网址:
http://localhost/mysite/gii/index/
你不需要索引/最后... http:// localhost/mysite/gii/should work – 2012-03-06 04:58:49