ASP. NET websites use Chinese URLs under pseudo-static conditions, asp.net
First, what is a Chinese URL? It is not a common way to encode Chinese characters as % CF % EC, but to directly use Chinese Characters in URLs.
This form is not widely seen at present. Different browsers may have different processing methods, but according to my tests, IE8 and Firefox are fully supported.
The advantage is that the link address can be easily understood! Search engines are also supported.
First, let's talk about the pseudo-static state of my asp.netwebsite. All my files end with .htm and are actually dynamic ASP. The method is to map htm to An aspx file in the background.
Pseudo-static rules are defined in the web. config file.
Form 1:
Http://www.huochebar.com/beijing.htm
Pseudo static code
<Rules>
<RewriterRule>
<LookFor> ~ /([^ Province/city to] +) [province/City] \. htm </LookFor>
<SendTo>
<! [CDATA [~ /Prov. aspx? Provname = $1]>
</SendTo>
</RewriterRule>
</Rules>
Form 2:
Http://www.huochebar.com/hubei /hankou .htm
<Rules>
<RewriterRule>
<LookFor> ~ /([^/] +)/(\ W +) \. htm </LookFor>
<SendTo>
<! [CDATA [~ /City. aspx? Provname = $1 & cityname = $2]>
</SendTo>
</RewriterRule>
</Rules>
The actual code processing is implemented in the background files prov. aspx and city. aspx, but the pseudo-static state completely hides this point.
What is the List link of aspnet pseudo-static url rewrite?
Modify the program. The program list is written as an HTML address.
Implement pseudo-static aspnet website pages
1. Find a file named UrlRewriter. dll on the Internet and put it in the bin folder of the item directory.
2. Configure web. config
(1) Add <section name = "CustomConfiguration" type = "URLRewriter. Config. UrlsSection, URLRewriter"/>
(2) add <add type = "URLRewriter. RewriterModule, URLRewriter" name = "RewriterModule"/> to the httpModules tab.
(3) add in the configuration tag
<CustomConfiguration>
<Urls>
<Add virtualUrl = "~ /News (. [0-9] *) \. html "destinationUrl = "~ /Article. aspx? Id = $1 "/>
<Add virtualUrl = "~ /Newsddd (. +) "destinationUrl = "~ /News. aspx? Id = $1 "/>
<Add virtualUrl = "~ /List (. [0-9] *) "destinationUrl = "~ /List. aspx? Id = $1 "/>
<Add virtualUrl = "~ /Admin/Login "destinationUrl = "~ /Admin/Login. aspx "/>
<Add virtualUrl = "~ /Search "destinationUrl = "~ /Search. aspx "/>
</Urls>
</CustomConfiguration>
These are Rewrite Rules