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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T20:09:46+00:00 2026-05-21T20:09:46+00:00

I need to match this route in my ASP MVC application: http://localhost/<itemName>/details When the

  • 0

I need to match this route in my ASP MVC application:

http://localhost/<itemName>/details

When the item name has illegal characters, for example the % symbol, the following URL will blow up:

(1) http://localhost/item%25Name/Details

In this case the correct URL would be:

(2) http://localhost/Details/?item=item%25Name

Is it possible to define routes in RegisterRoutes to match normal routes to (1), and routes with the % symbol in the item name, to (2)?

Thanks in advance

  • 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-21T20:09:47+00:00Added an answer on May 21, 2026 at 8:09 pm

    Here is what I would recommend you:

    1. For everything that is part of the query string you don’t have to worry. It’s not necessary to do any special routing.
    2. For everything that goes into the path part of the url you could filter dangerous characters. Here’s how this is done on StackOverflow with question titles in the url for example.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to match a image url like this: http://site.com/site.com/files/images/img (5).jpg Something like this
I need to create a default route for my application: match '/:controller(/:action(/:id))' The thing
I want to set up a route in my ASP.NET MVC 3 web application,
I need to match this and extract the value from these tags. Problem is
I have this schema which I need to match 2 rows from user_data :
What I need is something like this: /<[\w\d]+ ([\w\d]+\=[w\d])+\/>/ Something that would match several
I have created an otherwise empty ASP.NET MVC 3 application with 2 controllers, HomeController
I have a route like this: match '/:search/:page', :to => 'search#create' and in my
I need to set up routes wich will match links like this: 1: fixed/9731-monday-tuesday-wednesday-thursday-friday/922-another
I folllowed this : http://ruby.railstutorial.org/chapters/filling-in-the-layout#sec:user_signup . But when I try to access http://localhost:3000/pages/ it

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.