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>