Pseudo-Static of ASP.net website

Source: Internet
Author: User

First step: Refer to a DLL Intelligencia.UrlRewriter.dll (different DLLs may have different methods)

Step Two: Configure the use of pseudo static in Web.config

<configSections> (under the Configuration node)

<section name= "Rewriter" requirepermission= "false" type= " Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.urlrewriter "/>

</configSections>

Step three: Configure URL mappings in Web.config

<rewrite url= "~/index.htm" to= "~/index.aspx"/>

An example URL with no parameters is a pseudo static address to is actually mapped to the address

Where the URL map with parameters

<rewrite url= "~/demandlist-(. +). htm$" to= "~/demandlist.aspx?firid=$1"/>

Multiple arguments preceded by a number of parentheses note that the actual map to the address of multiple parameters is a &amp; split equivalent to &

such as: <rewrite url= "~/quotations-(. +)-(. +). htm$" to= "~/quotations.aspx?id=$1&amp;userid=$2"/>

The URL pseudo static is already implemented in this program

Configuring IIS to enable IIS to support page pseudo-static

Step one: Right click on the Web site stand-alone "attribute" = "Home directory =" Configuration find the line with the. aspx extension selected

Click to edit the contents of the copy executable file to close this window click to add an extension to the box where you pasted the information you just copied into the executable file. You can click OK if you want to use the "Confirm File exists" check box.

Related Article

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.