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:
The front end SiteMapPathTreeViewNavigationVB.aspx page looks something like this:
<table> <tr> <td><asp:SiteMapDataSource Runat=server ID="SiteMapDataSource1" /> <br /></td> </tr> <tr> <td> <asp:Label Runat=server Text="TreeView" id="Label3" ForeColor="#ff3366" /> <asp:TreeView ID="TreeView1" DataSourceID="SiteMapDataSource1" Runat=Server /> </td> </tr> <tr> <td> The current virtual path for the request is:<b> <% Response.Write(Request.Path)%></b>. <br /> The value of the category querystring variable is:<b> <% Response.Write(Server.HtmlEncode(Request.QueryString("category")))%></b>. <br /> However, the original path that was requested before it was remapped is:<b> <% Response.Write(Request.RawUrl)%></b>. </td> </tr> </table>