tips/tricks#5: Using URL rewriting to hide complex URLs

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.