Intelligencia. urlrewriter. dll aspx is rewritten to an HTML instance (Asp.net 2.0) for a whole day of work.

Source: Internet
Author: User

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.

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.