Friday, July 13, 2012

Url Rewritting in 2.0

 urlMappings redirect URLs to new locations. This element is part of an ASP.NET config file. It quickly redirects Googlebot and users alike to the new locations. It is easily added to Web.config to perform this complex task.


Now in the web config file you can put below code in between <system.web> and</system.web>


<urlMappings enabled="true" >
 <!--url which you want mappedURL = transfered url location -->
 <add mappedUrl="~/Detail.aspx?id=1" url="~/one.aspx"/>
 <add mappedUrl="~/Detail.aspx?id=2" url="~/two.aspx"/>
  <add mappedUrl="~/Detail.aspx?id=3" url="~/three.aspx"/>
  <add mappedUrl="~/Detail.aspx?id=4" url="~/four.aspx"/>
  </urlMappings>



mappedurl=  mapping applied on this url


Url=which is not available but stilll you made it to appear.

No comments:

Post a Comment