Default Action With Path Url Type

Hi,

Does anyone know if it’s possible to have a default action when using the ‘path’ urlmanager type? For example, I want to be able to use this url:

http://www.example.com/controller/variable

Right now when I try the above url, all I get is an error message, “The system is unable to find the requested action ‘variable’”. In my controller I have the $defaultAction variable set correctly.

Any suggestions?

Thanks,

Bob

In config/main.php

You can set defaultController

and in any controller you can set defaultAction to call when controller is accessed

Thanks, but as I said, the default action is set correctly. That’s not the issue. How can I let Yii know that I am not passing an action in the url, but a variable?

you can create a named route and then access it using $_GET