If I have a url like
http://host/index.php?r=authAssignments/index
how do I use urlManager to get a url like
http://host/index.php?r=rbam/authAssignments/index
instead, please? I’ve never had any luck with the urlManager
If I have a url like
http://host/index.php?r=authAssignments/index
how do I use urlManager to get a url like
http://host/index.php?r=rbam/authAssignments/index
instead, please? I’ve never had any luck with the urlManager
Hi
urlManager almost always used to sanity names of url variables so
http://host/index.php?r=authAssignments/index
could be
http://host/index.php/authAssignments/index
so, set rules in urlManager in config/main.php
check this for example
array(
'rbam/authAssignments/index'=>'authAssignments/index'
)
Is that the right way round, in your example? The rbam module is generating the first URL in my post, but it needs to be the second.
Anyway, either way around gives the same result:
Error 404
Unable to resolve the request "authAssignments/index".
Is it possible to turn off urlManager? Maybe that’s what I have mistakenly done somewhere.
No, rbam is a module so, the routeis module/controller/action.
does
http://host/index.php?r=rbam/authAssignments/index
works if
you completely remove (comment) the urlManager?
also for modules you have to set in urlManager rule first of all
'<module:\w+>/<controller:\w+>/<action:\w+>/<id:\d+>'=>'<module>/<controller>/<action>',
I didn’t try the module: part I don’t think.
In the end I went with creating a dummy controller which redirects to
rbam/authAssignments/index
.