Asp url rewriting technology IIS ISAPI

Source: Internet
Author: User

First download the ISAPI rewrite (if the download fails, Please prompt for this space Update). Now, Baidu can find it,

After decompression, there will be four files: httpd. ini, httpd. parse. Errors, mtbnotif. dll, and rewrite. dll.

We only need to use two files: rewrite. dll and httpd. ini. The other two files are also available. Don't delete them ......

Add rewirte. DLL to IIS,

Select the virtual directory you want to add, right-click, select "properties", click "ISAPI screener", and click "add ",

Edit the httpd. ini file:

This website is developed using ASP, for example, when viewing news,

Generally, this is the URL http: // localhost/news/newsview. asp? Id = 123. Now we use the URL to rewrite it to http: // localhost/news/news_123.html,

Add the rewriterule rewrite rule to the httpd. ini file,

[Isapi_rewrite]

#3600 = 1 hour
Cacheclockrate 3600

Repeatlimit 32

# Output path

# The path to be overwritten (\ D +) is the first parameter to be replaced by any integer $1. If there is a second parameter, you can use $2, and so on.
Rewriterule/client/NewS _ (\ D +) + \. html/client/newsview \. asp \? Id = $1

Finally, you need to change the hyperlink on the ASP Webpage,

Previously,

<A href = "client/newsview. asp? Id = <% = newsrs ("article_id") %> "> <% = newsrs (" ar_title ") %> </a>

 

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.