Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5972607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:40:55+00:00 2026-05-22T20:40:55+00:00

I have one URL hosting two site, main site and group site. Both main

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T20:40:56+00:00Added an answer on May 22, 2026 at 8:40 pm

    What about writing a route with a constaint on one of the parameters?

    routes.MapRoute(
          "Grouproute", // Route name
          "{group}/{action}/{id}", // URL with parameters
          new { controller = "Group", action = "Index", id = UrlParameter.Optional }, // Parameter defaults
          new { group = @"^.{1}group$" } //Contraints
      );
    

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two URLs: One is the application URL = http://domain.com/app One is the
I have two pages. First one we open with $_POST variables in its url,
I have 2 web hosts from two different hosting company. One is for hosting
I have two separate servers. One is hosting django instance on www.example.com , the
I have one million URL list to fetch. I use this list as nutch
I have a scenario where a user will have access to a one-time-url. When
If you have a url such as the one as follows: http://www.example.com/400x200 is it
I am using below URL to show line chart but one thing I have
Let's suppose I have xml like this one: <Server Active=No> <Url>http://some.url</Url> </Server> C# class
I have an ecommerce site which currently has product URLs like this: http://www.mydomain.com/nike-tshirt/Large http://www.mydomain.com/nike-tshirt/Medium

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.