views:

48

answers:

2

My app is currently written to accept vendor and product information like this.

http://www.mydomain.com/foo.aspx?v=1&p=100

could this be re-written like this?

http://www.mydomain.com/1/100/foo

Since the values in the original query string are database IDs, how would I express newly created IDs as segments of the "path" in the re-written version of the URL? My goal would be to create more of an automated solution that would accomplish this.

EDIT:

The app is written using ASP.NET webforms, .NET 4.0 and IIS 7

A: 

If you have access to your own server you might want to look at: http://www.microsoft.com/web/spotlight/urlrewriter/

And otherwise you can have a look at the file BlogEngine.Core\Web\HttpModules\UrlRewrite.cs in the source of http://blogengine.codeplex.com/releases/view/39387 for an example.

The poster below has something if you use .NET 4.0!

Symbioxys
A: 

Here is a good article on URL Routing in ASP.NET 4.9: 4 Guys from Rolla Article

bechbd