1. http://urlrewriter.net/download and decompress the intelligencia. urlrewriter. dll file to add reference to the web project.
2. Web. config Configuration:
<Configsections>
<! -- Urlrewriter -->
<Section name = "rewriter" requirepermission = "false" type = "intelligencia. urlrewriter. configuration. rewriterconfigurationsectionhandler, intelligencia. urlrewriter"/>
</Configsections>
<System. Web>
<! -- Urlrewriter -->
<Httpmodules>
<Add type = "intelligencia. urlrewriter. rewriterhttpmodule, intelligencia. urlrewriter" name = "urlrewriter"/>
</Httpmodules>
</System. Web>
</System. Web>
<! -- Urlrewriter -->
<Rewriter>
<Rewrite url = "~ /Test_([a-za-z1_0000.html $ "to = "~ /Show. aspx? Code = $1 "Processing =" stop "/>
</Rewriter>
Where: <rewrite url = "~ /Test_([a-za-z1_0000.html $ "to = "~ /Show. aspx? Code = $1 "Processing =" stop "/>
If the code is ABC, the result is "virtual directory name/test_abc.html ". If bar .html is replaced with. aspx, it is "virtual directory name/test_abc.aspx"
3. IIS configuration:
If you use "virtual directory name/test_abc.aspx", you do not need to configure IIS. Use "virtual directory name/test_abc.html" to configure IIS as follows:
The figure 9 inside the http://urlrewriter.net/index.php/support/installation/windows-server-2003/ is not accurate, accurate:
There is also the "untick verify that file exists." In Step 8 to be careful. Otherwise, HTML rewriting is invalid.
4: Remarks
Do not add ". html ing" in "application extension". Otherwise, normal HTML cannot be accessed.