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 349399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T11:27:17+00:00 2026-05-12T11:27:17+00:00

Normally my URLs look like the standard: www.example.com/controller/action Now I want to setup my

  • 0

Normally my URLs look like the standard: www.example.com/controller/action

Now I want to setup my administration section like:

 www.example.com/admin/
 www.example.com/admin/user/list
 www.example.com/admin/content/add
etc.

So the format is: www.example.com/admin/controller/action

I can’t seem to figure out how to setup the routes so it looks like the above.

  • 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-12T11:27:17+00:00Added an answer on May 12, 2026 at 11:27 am

    You just need to map a new path with the ‘admin’ section hardcoded at the beginning of the route definition.

    For example add this to your routes in RegisterRoutes in the Global.asax.cs file and make sure it appears above the default route (assuming you haven’t added other routes):

    routes.MapRoute(
        "Default",                                              
        "admin/{controller}/{action}/{id}",                     
        new { controller = "Home", action = "Index", id = "" } 
    );
    

    Note: the ‘admin’ part hardcoded at the start of the route definition.

    Note 2: If you have added other routes beyond the default you will need to make sure your routes are ordered correctly.

    Here is a link to a good blog post from Scott Guthrie regarding MVC routing: URL Routing

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

Sidebar

Related Questions

I'm using MVC with /<module>/<controller>/<action>/ have a module at example.com/module/whatever, and I need to
Search forms go to ugly urls normally. If I want users to see nice
Normally when I want to change the connection for a Query Editor Window in
Normally, if I want to start a new activity I can use StartActivity(typeof(foo)); This
Normally the XML files I have to parse are like this: <row id=1> <title>widget<title>
Normally, when I want to allow a user to download a file without revealing
I'm at my wits end here , I normally like to work things out
I've seen somewhere a urls.py construct like this: from project.f import SomeClass urlpatterns =
I need to redirect the following two URLs as shown: http://domain.com/folder/file.php -> http://domain.com/folder2/ http://damain.com/folder/file2.php?id=13
Basically, I am lazy and I just want jQuery to update my image URLs

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.