This tutorial will show you how to use URL mapping technology in ASP.NET 2.0 and C#.

The URL mapping feature uses configuration information stored in web.config to remap incoming requests to a different URL. The remapping occurs prior to any other processing for the inbound request. Although the sample below demonstrates remapping a page request, any arbitrary file type can have its request remapped to a different URL.

At first you need to build a sitemap file Web.sitemap. The code as following:

Secondly, please build a web.config file. The code is as following::

The front end UrlMappingCsharp.aspx page looks something like this:

Download Source Files