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

  • Home
  • SEARCH
  • 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 6583345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:23:48+00:00 2026-05-25T16:23:48+00:00

I have an ASP.NET MVC 3 application where users can post suggestions along the

  • 0

I have an ASP.NET MVC 3 application where users can post suggestions along the lines of “bla bla would be better if yada yada yada”.
For the suggestion detail page I have defined a nice SEO friendly route as follows:

routes.MapRoute(null, "suggestion/{id}/{it}/would-be-better-if-{if}", 
    new { controller = "suggestion", action = "details" });

As you can see I want the “would be better if” part to be fixed.

This route works perfectly for any old suggestion and generates links like suggestion/5/this-site/would-be-better-if-it-had-a-iphone-application, and clicking on the link actually requests the appropriate detail page.

A friend of mine, who ironically happens to be a tester, has managed to, involuntarily, post a suggestion that actually breaks the route: “This site would be better if ‘would be better if’ was always aligned in the middle“.
The link generated for this suggestion is
/suggestion/84/this-site/would-be-better-if-would-be-better-if-was-always-alligned-in-the-middle.

I have tried Phil Haack’s Routing Debugger and have confirmed that the route will actually work up until suggestion/84/this-site/would-be-better-if-would-be-better-if-, so the second “would-be-better-if” is actually accepted; adding anything after that will actually cause the url not to match any route (thanks to Omar -see comments- for help).


Please bear in mind that I really don’t want to change the route definition since I think it is as good as I can manage for this case, SEO-wise.

So, how come having text equal to the fixed part of the route prevents the link from matching the route? why is the route breaking?

I am actually rahter more interested in the why, as I believe understanding the why will lead to a solution or at least a proper understanding of a rather interesting problem.

  • 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-25T16:23:48+00:00Added an answer on May 25, 2026 at 4:23 pm

    This looks like a dupe of ASP.NET routing: Literal sub-segment between tokens, and route values with a character from the literal sub-segment which is a much simpler version of the bug. I’d recommend closing this one in favor of that one.

    I answered that question.

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

Sidebar

Related Questions

If I have an ASP.Net MVC applicaiton where users can only access via an
I have a file upload function in my asp.net mvc application that allows users
I have an ASP.Net MVC application. I am trying to post data to an
We have an ASP .NET MVC application that allows users to provide a set
I have an ASP.NET MVC application that uses Linq to SQL repositories for all
I have an ASP.NET MVC application, when a user clicks on the submit button
I have an application (ASP.NET MVC) that uses a Next New method to get
I have an ASP.NET MVC-application which I want deployable on both IIS6 and IIS7
I have an asp.net mvc application with a route similar to: routes.MapRoute(Blog, {controller}/{action}/{year}/{month}/{day}/{friendlyName}, new
I have an asp.net mvc application and i am trying to assign value to

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.