Problem with urlManager

hi, i have a urgent problem right now. I can not access several link in my site. The problem is yii can’t find some url which the view use more than one word with underscore as separator.

for example: i can access but i can’t access Is it possible have different name between views’s name and controller. for example:





this is my example site:

Please try to click "User Manager" and "Detail User" menu.


How did you try to achieve this? Show the code behind your urlmanager in your config

this is my code:

'urlManager' => array(

                        'caseSensitive' => false,

			'showScriptName' => false,			



				'' => 'site/index',	

				'<view>' => array('site/page'),






I’ve been trying solve this problem about 10 hours. It runs well on my localhost. It gets error. This my .htaccess code:

Options +FollowSymLinks

IndexIgnore */*

<IfModule mod_rewrite.c>

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 permision to all folder is 755


You have an issue with the caseSensitive attribute.

Try this on your site:

Can you paste the code for your menu here.

thanks you

but i have set option of caseSensitive to false in the urlManager. :rolleyes:

this is my code for menu:

	<div id="mainmenu">

		<?php $this->widget('zii.widgets.CMenu',array(


				array('label'=>'Home', 'url'=>array('/site/index')),

				array('label'=>'User Manager', 'url'=>array('/usermanager/index')),

				array('label'=>'Detail User', 'url'=>array('/usermanager/view')),


				array('label'=>'About', 'url'=>array('/site/page', 'view'=>'about')),

				array('label'=>'Contact', 'url'=>array('/site/contact')),

				array('label'=>'Login', 'url'=>array('/site/login'), 'visible'=>Yii::app()->user->isGuest),

				array('label'=>'Logout ('.Yii::app()->user->name.')', 'url'=>array('/site/logout'), 'visible'=>!Yii::app()->user->isGuest)


		)); ?>

	</div><!-- mainmenu -->

how about if i rename view’s folder to “user_manager” and in the controller i set the render like this:


Is it going to work?

thanks again

I don’t think so!

Looking at your site none of your urls are friendly urls. Are you sure that you have removed the comments around the urlManager config in your main.php?

oops, sorry now i have already change. this is my code for UserManagerController.php


class UserManagerController extends Controller


	public function actionIndex()




	public function actionView()







You should probably have something like:

class UserManagerController extends Controller


        public function actionIndex()




        public function actionView()





Don’t rename the view folder and rather leave it as it was generated by the gii/yiic. What you are trying to achieve should only be achieved via the urlManager config. Can you please post the name of the view folder for this controller

keep your menu as:

array('label'=>'User Manager', 'url'=>array('/usermanager/index')),

array('label'=>'Detail User', 'url'=>array('usermanager/view')),

Ok, i’ll do it

Ok, i’ll keep the name as it was generated by the gii/yiic.

but i have try to access after i set urlManager and it’s always error

i try this link (error) and (error too) and (same error)

this the name of views:



thanks again :)

sorry for bad english

this is strange. I would’ve expect the views to be something like:



Can you set them as above and let me know the result

I could not figure out and it’s not make sense, how this could happen.

on my localhost, everything works well

Are you sure that your localhost code is synchronized with your remote server? Do one last synchro and try again cause I am running out of suggestions

I’m sure my local code is same with server code. But i’m not sure my local server configuration is same with server configuration.

on local i’m using XAMPP Lite v1.7.3 and on server i’m using centOS linux with php 5.3.1