Note: This series records the problems encountered in my actual development and collects some tips articles.
This tips and tricks record is: Using URL rewrite to hide complex URLs, very simple tricks, I believe we all know.
This scene is too common, of course there are many ways, I will introduce a very simple way!
First step: Simulate the Mapping page
We want to click on the guid.html link on one page to jump to the guid_{492f3e0b-848e-11da-9550-00e08161165f}.html page of the complex URL. That is, define a map that hides the actual URL and maps it to a URL that is more easily remembered by the user.
Step two: How to do it
A very simple one, set urlmappings on the system.web node of the Web. config file.
<system.web> <urlmappingsenabled="True"> <AddURL="~/guid.html"Mappedurl="guid_{492f3e0b-848e-11da-9550-00e08161165f}.html"/> </urlmappings></system.web>
At this point, click the Guid.html link, the Address bar is guid.html, is actually guid_{492f3e0b-848e-11da-9550-00e08161165f}.html page content.
Ok!
Copyright NOTICE: This article for Bo Master http://www.zuiniusn.com original article, without Bo Master permission not reproduced.
tips/tricks#5: Using URL rewriting to hide complex URLs