Depends on how many items do you have, and what are their names.
Look, you need to tell Yii that in this case it's a item, and in that case it's a controller name.
If you don't, then Yii is not able to tell apart controller name and item name.
There are a lot of ways of doing it, and if you use forum search you'd probably find some examples, because this question is very frequently asked.
My favourite way is using suffixes:
/something.html = item/index?name=something (as param name)
/something = something/index (as controller name)
Other ways are:
- Listing all available controller names in the rule. That is, "if param doesn't look like one of known controller names then it's a param for item/index"
- Modifying default routing rules so that all params starting with, say, 'c_' are controller names. All the rest is params.
That is, "if param equals to c_..., then it's a controller name, otherwise is a param".
- Using virtual 'folders', like '/c/something' = controller, "/something" is a param.
- ... and many more
You'll probably find many good examples here