Account for simple url rewriting in ASP.NET MVC redirect
Posted
by Kevin Montrose
on Stack Overflow
See other posts from Stack Overflow
or by Kevin Montrose
Published on 2010-05-19T02:27:38Z
Indexed on
2010/05/19
2:30 UTC
Read the original article
Hit count: 388
How would you go about redirecting in ASP.NET MVC to take into account some external URL rewriting rules.
For example:
- What the user enters: http://www.example.com/app/route
- What ASP.NET MVC sees: /route
- What I want to redirect to: http://www.example.com/app/other_route
- What actually happens when I do a simple RedirectToAction: http://www.example.com/other_route (which doesn't exist, from the outside anyway)
This seems like it should be simple, but I'm drawing a blank.
© Stack Overflow or respective owner