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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:56:47+00:00 2026-05-13T10:56:47+00:00

This is my first post after being a long-time lurker – so please be

  • 0

This is my first post after being a long-time lurker – so please be gentle 🙂

I have a website similar to twitter, in that people can sign up and choose a ‘friendly url’, so on my site they would have something like:

mydomain.com/benjones

I also have root level static pages such as:

mydomain.com/about

and of course my homepage:

mydomain.com/

I’m new to ASP.NET MVC 2 (in fact I just started today) and I’ve set up the following routes to try and achieve the above.

    public static void RegisterRoutes(RouteCollection routes)
    {
        routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
        routes.IgnoreRoute("content/{*pathInfo}");
        routes.IgnoreRoute("images/{*pathInfo}");

        routes.MapRoute("About", "about",
            new { controller = "Common", action = "About" }
        );

        // User profile sits at root level so check for this before displaying the homepage
        routes.MapRoute("UserProfile", "{url}",
            new { controller = "User", action = "Profile", url = "" }
        );

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

For the most part this works fine, however, my homepage is not being triggered! Essentially, when you browser to mydomain.com, it seems to trigger the User Profile route with an empty {url} parameter and so the homepage is never reached! Any ideas on how I can show the homepage?

  • 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-13T10:56:48+00:00Added an answer on May 13, 2026 at 10:56 am

    Can you not swap the bottom two routes?

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

Sidebar

Related Questions

this is my first post on this website, but I'm all the time getting
This is my first post here. I have a problem. I need to take
This is my first post on Stack, so please bear with me if I
This is my first post and I have to admit, I am terrible at
this is my first post on this website, Anyway, I recently started trying to
Hello stackoverflow guru's! This is my first post after having used the site for
Hello all! This is my first post on stackoverflow. After hours of searching and
This is my first post on Stack Overflow and I'm just wondering on the
this is my first post here on stackoverflow and am very impressed by the
This is my first post in stackoverflow. I want to improve its google pagerank

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.