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 @@
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
Quoting Special Characters
Environment Variables
Rewriting in Virtual Hosts
Practical SolutionsAs 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.
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.
-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/ -
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
-
For numerous examples of common, and not-so-common, uses for - mod_rewrite, see the Rewrite - Guide, and the Advanced Rewrite - Guide documents.
-