ASP tips: Using ISAPI

Source: Internet
Author: User
Tags expression regular expression
Tips | The following is a simple example, I want someone to input http://server/test-12314.html actually access is http://server/test.asp?id=12314. Then our matching expression should be/test-([0-9]*). HTML-corresponding format expression should be/test.asp\?id=$1.

When you write regular expressions, you can use the Regular expression test tool provided by Isapi_rewrite (provided by the default installation) for debugging. The following figure:


The matching expressions and formatting expressions are done, and you can put them in the Httpd.ini under the installation directory in the following format. In the Apche, of course, in the httpd.conf.

Format: rewriterule matching expression format expression
Just the example: rewriterule/test-([0-9]*). html/test.asp\?id=$1

After the file is saved, you do not have to restart IIS to take effect. Apache requires a reboot.

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.