I have one URL hosting two site, main site and group site. Both main site and group site has login, change password, reset password, etc.
For example :
www.abc.com -> main site
www.abc.com/login -> main site login
www.abc.com/Agroup/login -> group site login
www.abc.com/Agroup/changepassword -> group site change password
www.abc.com/Bgroup/login -> group site login but for Bgroup
I want Agroup and Bgroup is handled by one controller which is making the portion (Agroup/Bgroup) a parameter in action, while one controller handling the main site.
How to write route for that, thanks
What about writing a route with a constaint on one of the parameters?
You might need to tweak the contraint regex to fit your need. Now it expect it to be group.
Note that this will invoke the same Login action on the Group controller for both groups, so you will have to check the group parameter on the Login method to differentiate between the different groups.