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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:24:27+00:00 2026-05-14T02:24:27+00:00

ASP.NET MVC web app that exposes friendly URLs: http://somesite.com/friendlyurl …which are rewritten (not redirected)

  • 0

ASP.NET MVC web app that exposes “friendly” URLs:

http://somesite.com/friendlyurl

…which are rewritten (not redirected) to ASP.NET MVC-style URLs under the hood:

http://somesite.com/Controller/Action

The user never actually sees any ASP.NET MVC style URLS. If he requests one, we hard 404 it. ASP.NET MVC is (in this app) an implementation detail, not a fundamental interface.

My question: how do you examine an arbitrary incoming URL and determine whether or not that URL matches a defined ASP.NET MVC path?

For extra credit: how do you do it from inside an ASP.NET-style IHttpModule, where you’re getting invoked upstream from the ASP.NET MVC runtime?

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-14T02:24:27+00:00Added an answer on May 14, 2026 at 2:24 am

    why do you have the “hard” urls in the first place then? just change your routing, it seems kind of odd to rewrite something you have complete control over.

    If you can’t, you probably want something along these lines

    Response.StatusCode = (int)HttpStatusCode.NotFound;
    return View("NotFound");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on an ASP.NET MVC web app that allows people to publish
I've got an Asp.Net mvc web app that has a controller action to handle
I have an ASP.NET MVC web app and have a function that I need
Background I have a page on my ASP.NET MVC web app for users to
My team is considering building our next web app using the ASP.NET MVC framework.
Other than the fact that ASP.NET MVC Web Application has more clarity in its
I'm looking to create a solution for a asp.net mvc app that displays unstructured
I have built an ASP.NET MVC 3 web application (with exlusively Razor/cshtml pages) that
I have a hybrid ASP.Net web forms/MVC app. On one of the MVC pages/views,
I have an asp.net mvc website which of course has a web.config file. I

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.