I am developing a website with the PHP Yii Framework and now I am putting the stack, I need to run gii, but I cannot do this. when I print www.example.com/index.php/gii or www.example.com/gii it gives me this error:
/gii/default/login // <- website redirects to here This webpage has a redirect loop The webpage at http://www.example.com/gii/default/login has resulted in too many redirects. Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer.
I do not think the error is caused by the htaccess change and the main configuration, but in any case, here is the main.php configuration file:
'urlManager'=>array( 'urlFormat'=>'path', 'showScriptName'=>false, 'rules'=>array( 'site/page/<view:\w+>'=>'site/page', '<controller:\w+>/<cact:\w+>/<action:\w+>'=>'<controller>/<cact>', '<controller:\w+>/<id:\d+>'=>'<controller>/view', '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>', '<controller:\w+>/<action:\w+>'=>'<controller>/<action>', ), ),
and .htaccess:
Options +FollowSymLinks IndexIgnore */* RewriteEngine on #non-www to www RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] # 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 [L]
So can you help me please?
source share