Urlmanager Route Problems

I have the following problem, according to the documentation the following

'urlManager' => array(

    'urlFormat' => 'path',

    'showScriptName' => false,

    'rules' => array(

        array('api/<model>/list', "pattern" => "api/<model:\w+>", 'verb' => 'GET')



When I call GET host/api/messages it should evaluate as host/api/messages/list, but for some reason it is not working it is trying to open the index function and not the list function.

Should I call GET host/api/messages/list everything works as expected.

Can anyone help me with this problem?

Also I was wondering if I have the following in the rules array

array('api/<model>/update', 'pattern' => 'api/<model:\w+>/<id:\d+>', 'verb' => 'PUT')

Can I evaluate it to be PUT host/api/messages/1 instead of PUT host/api/messages/id/1


I use this syntax:






				'' =&gt; 'sites',

				'rss' =&gt; 'sites/feed',


				'news/' =&gt; 'post/index',

	      		        'news/&lt;id:&#092;d+&gt;/&lt;title:([a-z -_]*)&gt;'=&gt;'post/view',




this is a huge pattern: ‘news/page-<page:\d+>’

and it is routed to ‘post/index’,

what written in "< … >" -> that going be in $_GET superglobal

example: ‘news/<id:\d+>/<title:([a-z -_]*)>’ => $_GET[‘id’] and $_GET[‘title’]

you can check it

function public actionIndex(){

		&#036;aa = &#036;_GET['id']. ' - ' .&#036;_GET['title'];





You are right turns out there were two urlManager sections and that is why it wasn’t working.

As soon as I removed the second one it started working.