0

Say I have 3 Controllers ShareController, IndexController and AjaxController

I set the IndexController as the DefaultController. But I would like /share to show the Index Action of Share instead of trying to find the share Action of IndexController

My current urlManager:

'rules'=>array(
          '<action:\w+>' => 'site/<action>',
          '<controller:\w+>/<id:\d+>'=>'<controller>/view',
          '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
          '<controller:\w+>/<action:\w+>'=>'<controller>/<action>'

1 Answer 1

1

Add this rule inside your url-manager rules:

"share" => "share/index"
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.