Isapi_rewrite Chinese Reference Manual 1th/3 page _ Application Tips

Source: Internet
Author: User
Tags connection pooling server port
Isapi_rewrite Chinese Handbook
Original document: http://www.isapirewrite.com/docs/

=========================================
Configuration:
On NT XP and 2003 platforms, the system account should inetinfo the program should be running with IIS5 in a coexistence mode filter. So the system account should be given to all the Isapi-rewirite DLLS and all the httpd. INI file with at least Read permission, we also recommend to give the system account for all including httpd. INI file's folder, which will allow HTTP to be generated. PARSE. Errors files that contain configuration file syntax errors. Additional permissions are required for the proxy module because it will run in connection pooling or high-isplated application mode, and the IIS account sharing pool and high-isolation pool should be given to Rwhelpere. The Read permission for the DLL. By default iwam-"computer name" is used in all pools, and a pool account should be established in the corresponding COM + application settings with the help of Com+administration MMC snap-in
Configuration file Format:

There are two forms of configuration Files-global (server-level) and individual (site-leval) files, The global configuration file should be named Httpd.ini and appear in the Isapi-rewrite installation directory, and the file's shortcuts are provided through the Start menu, and the individual configuration file should be named httpd. INI and can appear in the physical root directory of the virtual site, the two types of formatting are the same and are standard Windows. INI file, all instructions should be placed in this section and all instructions should be placed with a divider line, any text other than this will be ignored

HTTPD. INI file example

[Isapi_rewrite]

# This is a comment

# 5 minutes
Cacheclockrate 300
Repeatlimit 20

# Block external access to the Httpd.ini and httpd.parse.errors files
REWRITERULE/HTTPD (?: \. ini|\.parse\.errors)/[F,i,o]

# Block external access to the Helper ISAPI Extension
Rewriterule. *\.isrwhlp/[F,i,o]

# Some Custom Rules
Rewritecond Host: (. +)

Rewritecond directives

Syntax: (syntactic) Rewritecond testverb Condpattern [Flags]
This instruction defines a conditional rule that pretesting the rewritecond instruction before the rewriterule or Rewriteheader or rewriteproxy instruction, followed by its only pattern matching the current state of the URI and the additional conditions applied.

Testverb

Specifies verb that would be matched against regular expression.
Specifically defined verbs match the specified expression
testverb= (URL | Method | VERSION | Httpheadername: | %servervariable) Where:

Url-returns Request-uri of client Request as described in RFC 2068 (HTTP 1.1);
Returns the Request-uri of the requirements described by the client in RFC2068
Method-returns HTTP method of the client request (OPTIONS, GET, head, POST, put, DELETE or TRACE);
Returns HTTP methods for client requirements (OPTIONS, get, head, POST, put, DELETE or TRACE)
Version-returns HTTP version;
Return HTTP version
Httpheadername-returns value of the specified HTTP header. Httpheadername can is any valid HTTP header name. Header names should include the trailing colon ":". If specified header does not exists in a client's request Testverb is treated as empty string.
Returns the value of a defined HTTP header file
Httpheadername =
Accept:
Accept-charset:
Accept-encoding:
Accept-language:
Authorization:
Cookies:
From:
Host:
If-modified-since:
If-match:
If-none-match:
If-range:
If-unmodified-since:
Max-forwards:
Proxy-authorization:
Range:
Referer:
User-agent:
Any-custom-header
Get more information about HTTP header files and their values reference RFC2068


ServerVariable returns the value of a defined server variable. For example, the server port, the list of all server variables should be established in the IIS document, variable name to apply the% character reservation;
Condpattern
The regular expression to match Testverb
Regular expression Matching Testverb
[Flags]
The flags is a comma-separated list of the following flags:


O (normalize)
normalizes string before processing. Normalization includes removing of a url-encoding, illegal characters, etc. This flag are useful with URLs and url-encoded headers
Rewriterule directives
Syntax:rewriterule pattern formatstring [Flags]
This instruction can occur more than once, and each instruction defines a separate rewrite rule, which is important because the command is useful for applying runtime rules
current 1/3 page   1 23 Next read the full text

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.