From a26722b0929aa0bf67f6d4177525554816781f6b Mon Sep 17 00:00:00 2001 From: Eric Covener Date: Mon, 14 Nov 2011 13:15:09 +0000 Subject: followups on PR52175 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1201690 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/rewrite/tech.html.en | 16 +++++++++++----- docs/manual/rewrite/tech.xml | 17 ++++++++++++----- 2 files changed, 23 insertions(+), 10 deletions(-) (limited to 'docs/manual/rewrite') diff --git a/docs/manual/rewrite/tech.html.en b/docs/manual/rewrite/tech.html.en index 0c829470a6..c4139bd20c 100644 --- a/docs/manual/rewrite/tech.html.en +++ b/docs/manual/rewrite/tech.html.en @@ -66,12 +66,18 @@ and URL matching.

In per-directory context (i.e., within .htaccess files and Directory blocks), these rules are being applied after a URL has already been translated to a filename. Because of - this, mod_rewrite temporarily translates the filename back into a URL, - by stripping off the directory path (including a trailing slash) - before applying the rules. ) If a substitution is made, a new internal + this, the URL-path that mod_rewrite initially compares RewriteRule directives against + is the full filesystem path to the translated filename with the current + directories path (including a trailing slash) removed from the front.

+ +

To illustrate: If rules are in /var/www/foo/.htaccess and a request + for /foo/bar/baz is being processed, an expression like ^bar/baz$ would + match.

+ +

If a substitution is made in per-directory context, a new internal subrequest is issued with the new URL, which restarts processing of the - request phases. If the substution is a relative path, the RewriteBase directive - determines the URL-path prefix appended to the substitution. + request phases. If the substitution is a relative path, the RewriteBase directive + determines the URL-path prefix prepended to the substitution. In per-directory context, care must be taken to create rules which will eventually (in some future "round" of per-directory rewrite processing) not perform a substitution to avoid looping. diff --git a/docs/manual/rewrite/tech.xml b/docs/manual/rewrite/tech.xml index e1d519aee8..2b0d315662 100644 --- a/docs/manual/rewrite/tech.xml +++ b/docs/manual/rewrite/tech.xml @@ -76,13 +76,20 @@ and URL matching.

In per-directory context (i.e., within .htaccess files and Directory blocks), these rules are being applied after a URL has already been translated to a filename. Because of - this, mod_rewrite temporarily translates the filename back into a URL, - by stripping off the directory path (including a trailing slash) - before applying the rules. ) If a substitution is made, a new internal + this, the URL-path that mod_rewrite initially compares RewriteRule directives against + is the full filesystem path to the translated filename with the current + directories path (including a trailing slash) removed from the front.

+ +

To illustrate: If rules are in /var/www/foo/.htaccess and a request + for /foo/bar/baz is being processed, an expression like ^bar/baz$ would + match.

+ +

If a substitution is made in per-directory context, a new internal subrequest is issued with the new URL, which restarts processing of the - request phases. If the substution is a relative path, the RewriteBase directive - determines the URL-path prefix appended to the substitution. + determines the URL-path prefix prepended to the substitution. In per-directory context, care must be taken to create rules which will eventually (in some future "round" of per-directory rewrite processing) not perform a substitution to avoid looping. -- cgit v1.2.3