brown145
(Brown145)
February 24, 2011, 7:58am
1
Is it possible to use a module with a different url structure than moduleID/controllerID/actionID as indicated in the docs.
More specifically, I am using the user management extension and would like to have a login url something like www.mysite.com/login not the default www.mysite.com/user/user , like it is here: http://www.yiiframework.com/login/ .
You just need to specify on your main.php config file that www.mysite.com/login is actually www.mysite.com/user/user . Please see the docs for URL rewriting or browse the forum, there are plenty of posts to tell you how to do that
brown145
(Brown145)
March 1, 2011, 12:32am
3
Thanks that seems to do the trick.
And for any other noobs like me I updated my config like so:
components'=>array(
'user'=>array(
...
'loginUrl' => '/login', // Changed from /user/user/login
...
),
...
'urlManager'=>array(
'rules'=>array(
'/login'=>'/user/user/login', // Added
...
),
...
),
...
)
extremely helpful stuff. thanks.