From cvs-return-34221-apmail-httpd-cvs-archive=httpd.apache.org@httpd.apache.org Mon Nov 02 22:05:36 2009 Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 36717 invoked from network); 2 Nov 2009 22:05:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Nov 2009 22:05:36 -0000 Received: (qmail 97996 invoked by uid 500); 2 Nov 2009 22:05:36 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 97925 invoked by uid 500); 2 Nov 2009 22:05:35 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 97916 invoked by uid 99); 2 Nov 2009 22:05:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Nov 2009 22:05:35 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Nov 2009 22:05:24 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id B4B3F23888D8; Mon, 2 Nov 2009 22:05:02 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r832130 - in /httpd/httpd/trunk/docs/manual/mod: mod_rewrite.html.en mod_rewrite.xml Date: Mon, 02 Nov 2009 22:05:02 -0000 To: cvs@httpd.apache.org From: noirin@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20091102220502.B4B3F23888D8@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: noirin Date: Mon Nov 2 22:05:01 2009 New Revision: 832130 URL: http://svn.apache.org/viewvc?rev=832130&view=rev Log: Ripping out the stuff that isn't really module reference, and translating the introduction to English Modified: httpd/httpd/trunk/docs/manual/mod/mod_rewrite.html.en httpd/httpd/trunk/docs/manual/mod/mod_rewrite.xml Modified: httpd/httpd/trunk/docs/manual/mod/mod_rewrite.html.en URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mod_rewrite.html.en?rev=832130&r1=832129&r2=832130&view=diff ============================================================================== --- httpd/httpd/trunk/docs/manual/mod/mod_rewrite.html.en (original) +++ httpd/httpd/trunk/docs/manual/mod/mod_rewrite.html.en Mon Nov 2 22:05:01 2009 @@ -32,24 +32,22 @@ Compatibility:Available in Apache 1.3 and later

Summary

-

This module uses a rule-based rewriting engine (based on a - regular-expression parser) to rewrite requested URLs on the - fly. It supports an unlimited number of rules and an - unlimited number of attached rule conditions for each rule, to - provide a really flexible and powerful URL manipulation - mechanism. The URL manipulations can depend on various tests, - of server variables, environment variables, HTTP - headers, or time stamps. Even external database lookups in - various formats can be used to achieve highly granular URL - matching.

- -

This module operates on the full URLs (including the - path-info part) both in per-server context - (httpd.conf) and per-directory context - (.htaccess) and can generate query-string - parts on result. The rewritten result can lead to internal - sub-processing, external request redirection or even to an - internal proxy throughput.

+

The mod_rewrite module uses a rule-based rewriting + engine, based on a regular-expression parser, to rewrite requested URLs on + the fly. By default, mod_rewrite maps a URL to a filesystem + path. However, it can also be used to redirect one URL to another URL, or + to invoke an internal proxy fetch.

+

mod_rewrite provides a flexible and powerful way to + manipulate URLs using an unlimited number of rules. Each rule can have an + unlimited number of attached rule conditions, to allow you to rewrite URL + based on server variables, environment variables, HTTP headers, or time + stamps.

+

mod_rewrite operates on the full URL path, including the + path-info section. A rewrite rule can be invoked in + httpd.conf or in .htaccess. The path generated + by a rewrite rule can include a query string, or can lead to internal + sub-processing, external request redirection, or internal proxy + throughput.

Further details, discussion, and examples, are provided in the detailed mod_rewrite documentation.

@@ -66,80 +64,8 @@
  • RewriteOptions
  • RewriteRule
  • -

    Topics

    -

    See also

    - -
    top
    -
    -

    Quoting Special Characters

    - -

    As of Apache 1.3.20, special characters in - TestString and Substitution strings can be - escaped (that is, treated as normal characters without their - usual special meaning) by prefixing them with a slash ('\') - character. In other words, you can include an actual - dollar-sign character in a Substitution string by - using '\$'; this keeps mod_rewrite from trying - to treat it as a backreference.

    -
    top
    -
    -

    Environment Variables

    - -

    This module keeps track of two additional (non-standard) - CGI/SSI environment variables named SCRIPT_URL - and SCRIPT_URI. These contain the - logical Web-view to the current resource, while the - standard CGI/SSI variables SCRIPT_NAME and - SCRIPT_FILENAME contain the physical - System-view.

    - -

    Notice: These variables hold the URI/URL as they were - initially requested, that is, before any - rewriting. This is important to note because the rewriting process is - primarily used to rewrite logical URLs to physical - pathnames.
    - These variables are set in per-server context, which means - that they are available in per-directory context only, if - RewriteEngine is set to on in - per-server context.

    - -

    Example

    -SCRIPT_NAME=/sw/lib/w3s/tree/global/u/rse/.www/index.html
    -SCRIPT_FILENAME=/u/rse/.www/index.html
    -SCRIPT_URL=/u/rse/
    -SCRIPT_URI=http://en1.engelschall.com/u/rse/
    -
    - -
    top
    -
    -

    Rewriting in Virtual Hosts

    - -

    By default, mod_rewrite configuration - settings from the main server context are not inherited by - virtual hosts. To make the main server settings apply to virtual - hosts, you must place the following directives in each <VirtualHost> section:

    - -

    - RewriteEngine On
    - RewriteOptions Inherit -

    -
    top
    -
    -

    Practical Solutions

    - -

    For numerous examples of common, and not-so-common, uses for - mod_rewrite, see the Rewrite - Guide, and the Advanced Rewrite - Guide documents.

    -
    +
    top

    RewriteBase Directive

    @@ -1473,7 +1399,7 @@ Alias /def /ghi

    If you omit the PT flag, - mod_rewrite will rewrite + mod_rewrite will rewrite uri=/abc/... to filename=/def/... as a full API-compliant URI-to-filename translator should do. Then Modified: httpd/httpd/trunk/docs/manual/mod/mod_rewrite.xml URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mod_rewrite.xml?rev=832130&r1=832129&r2=832130&view=diff ============================================================================== --- httpd/httpd/trunk/docs/manual/mod/mod_rewrite.xml (original) +++ httpd/httpd/trunk/docs/manual/mod/mod_rewrite.xml Mon Nov 2 22:05:01 2009 @@ -33,97 +33,27 @@ Available in Apache 1.3 and later -

    This module uses a rule-based rewriting engine (based on a - regular-expression parser) to rewrite requested URLs on the - fly. It supports an unlimited number of rules and an - unlimited number of attached rule conditions for each rule, to - provide a really flexible and powerful URL manipulation - mechanism. The URL manipulations can depend on various tests, - of server variables, environment variables, HTTP - headers, or time stamps. Even external database lookups in - various formats can be used to achieve highly granular URL - matching.

    - -

    This module operates on the full URLs (including the - path-info part) both in per-server context - (httpd.conf) and per-directory context - (.htaccess) and can generate query-string - parts on result. The rewritten result can lead to internal - sub-processing, external request redirection or even to an - internal proxy throughput.

    +

    The mod_rewrite module uses a rule-based rewriting + engine, based on a regular-expression parser, to rewrite requested URLs on + the fly. By default, mod_rewrite maps a URL to a filesystem + path. However, it can also be used to redirect one URL to another URL, or + to invoke an internal proxy fetch.

    +

    mod_rewrite provides a flexible and powerful way to + manipulate URLs using an unlimited number of rules. Each rule can have an + unlimited number of attached rule conditions, to allow you to rewrite URL + based on server variables, environment variables, HTTP headers, or time + stamps.

    +

    mod_rewrite operates on the full URL path, including the + path-info section. A rewrite rule can be invoked in + httpd.conf or in .htaccess. The path generated + by a rewrite rule can include a query string, or can lead to internal + sub-processing, external request redirection, or internal proxy + throughput.

    Further details, discussion, and examples, are provided in the detailed mod_rewrite documentation.

    -Rewrite Flags - -
    Quoting Special Characters - -

    As of Apache 1.3.20, special characters in - TestString and Substitution strings can be - escaped (that is, treated as normal characters without their - usual special meaning) by prefixing them with a slash ('\') - character. In other words, you can include an actual - dollar-sign character in a Substitution string by - using '\$'; this keeps mod_rewrite from trying - to treat it as a backreference.

    -
    - -
    Environment Variables - -

    This module keeps track of two additional (non-standard) - CGI/SSI environment variables named SCRIPT_URL - and SCRIPT_URI. These contain the - logical Web-view to the current resource, while the - standard CGI/SSI variables SCRIPT_NAME and - SCRIPT_FILENAME contain the physical - System-view.

    - -

    Notice: These variables hold the URI/URL as they were - initially requested, that is, before any - rewriting. This is important to note because the rewriting process is - primarily used to rewrite logical URLs to physical - pathnames.
    - These variables are set in per-server context, which means - that they are available in per-directory context only, if - RewriteEngine is set to on in - per-server context.

    - -Example -
    -SCRIPT_NAME=/sw/lib/w3s/tree/global/u/rse/.www/index.html
    -SCRIPT_FILENAME=/u/rse/.www/index.html
    -SCRIPT_URL=/u/rse/
    -SCRIPT_URI=http://en1.engelschall.com/u/rse/
    -
    -
    - -
    - -
    Rewriting in Virtual Hosts - -

    By default, mod_rewrite configuration - settings from the main server context are not inherited by - virtual hosts. To make the main server settings apply to virtual - hosts, you must place the following directives in each VirtualHost section:

    - - - RewriteEngine On
    - RewriteOptions Inherit -
    -
    - -
    Practical Solutions - -

    For numerous examples of common, and not-so-common, uses for - mod_rewrite, see the Rewrite - Guide, and the Advanced Rewrite - Guide documents.

    - -
    RewriteEngine @@ -1489,7 +1419,7 @@ Alias /def /ghi If you omit the PT flag, - mod_rewrite will rewrite + mod_rewrite will rewrite uri=/abc/... to filename=/def/... as a full API-compliant URI-to-filename translator should do. Then