Using Gii with urlFormat='path' rule

Hi,

Since I’ve configured urlManager to use path as urlFormat:


'urlManager'=>array('urlFormat'=>'path',

I can’t access Gii anymore.

Here is my .htaccess:


Options +FollowSymLinks


RewriteEngine On

RewriteBase /myapp


# if a directory or a file exists, use it directly

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-l


# otherwise forward it to index.php

RewriteRule .* index.php [L]

Here is the part of my config concerning urlmanager:


'urlManager'=>array(

			'urlFormat'=>'path',

			'showScriptName'=>false,

			'caseSensitive'=>false,

			'rules'=>array(

				'gii'=>'gii',

            	'gii/<controller:\w+>'=>'gii/<controller>',

            	'gii/<controller:\w+>/<action:\w+>'=>'gii/<controller>/<action>',

				'<controller:\w+>/<id:\d+>'=>'<controller>/view',

				'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',

				'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',

			),

		),

Well, it seems to work if I change the .htaccess like this (the important thing is the last line):




Options +FollowSymLinks


RewriteEngine On

RewriteBase /myapp


# if a directory or a file exists, use it directly

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-l


# otherwise forward it to index.php

RewriteRule ^(.*)$ index.php/$1 [L]



It seems I have this problem because I use an apache Alias for my App.

If I configure my App to use a virtualhost, I don’t have the problem anymore.