Tip: Implement HTML static for ASP with ISAPI rewrite

Source: Internet
Author: User
Tags filter implement ini
techniques | Static ASP website program in the domestic application is very wide, but similar to im286.asp?id=20050307213811 such a URL is not conducive to the search engine, that is not in line with the friendly URL (urls-friendly) standards, Then we use Isapi_rewrite to create a clean URL, let the spider joy to climb your station.

Don't say much nonsense, start!
1. Download Isapi_rewrite.isapi_rewrite (Lite) and complete (full) version. The Lite version does not support overriding for each virtual host site and can only be globally processed. But for friends with servers, the lite version is enough. Compact Download Address: Http://www.helicontech.com/download/, that is the Lite version (free).

2. The installation of the. msi file, and install the same as the general procedures can be, I installed in D:\isapi_rewrite.

3. The next step is more important oh, look carefully. Open Internet Information Services, right-click, Web site properties, and the Electrical ISAPI Filter tab. Add a filter, the name fills itself, the path itself specifies Isapi_rewrite.dll, and then determines.


4. To test. Create a new 1ting.asp, which is written <%=request.querystring ("Inso")%&gt, the effect is the execution of the 1ting.asp?inso=* browser display *.


5. This step is important oh, start adding the rewrite rule. Regular, good headache, thanks to this example is relatively simple.
Find the Isapi_rewrite directory, remove the Httpd.ini read-only attribute, and open the edit. We're going to map 1ting.asp?inso=im286 to a type like 1ting-im286.html, and we need to add a line to the Httpd.ini. : rewriterule/1ting-([0-9,a-z]*). Html/1ting.asp\?inso=$1, save.


6. Come and see the effect in the browser. Enter http://127.0.0.1/1ting.asp?inso=im286 and http://127.0.0.1/1ting-im286.html, is the content displayed is im286? This proves to be a success!
 

Hey, 1ting-im286.html such a page is easier than 1ting.asp?inso=im286 income, so now still in the dynamic way friends can try such a static mapping effect. IIS rewrite can also implement such a feature.

Something: This feasibility may not be too strong, I just from the point of view of pure technology to discuss, the table patted me brick Ah, the last injury has not been raised well.

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.