Set new Default Folder / Controller
Is there a way to set a new Controller other than Home when a condition is met?
I want to be able to specify a default controller other than Home when a user is logged in.
So before a user logs in I want to use the default Home controller but once they have logged in I'd like to use say the User controller.
Better yet is there a way that I can use the following;
www.mysite.co开发者_StackOverflow中文版m/home/index when not logged in and, www.mysite.com/griegs when logged in.
www.mysite.com/griegs would then route to my User controller where 'griegs' is the Id/userName.
You can add to the global on start functions to intercept the requests before they hit the action itself... there you can check what's been requested (including the request URL) and redirect to a different action or the like as required.
精彩评论