From 345dd8c76f24b201afa80034bb02c02b911ddb09 Mon Sep 17 00:00:00 2001 From: Eric Covener Date: Mon, 14 Nov 2011 01:58:59 +0000 Subject: [PATCH] Merge r1201571 from trunk: PR52175: RewriteBase is what applies to relative substitutions, not the stripping of the per-directory prefix. Reviewed by: covener git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1201572 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/rewrite/tech.html.en | 11 ++++++----- docs/manual/rewrite/tech.xml | 12 +++++++----- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/docs/manual/rewrite/tech.html.en b/docs/manual/rewrite/tech.html.en index 9a8362229c..cbb70d4970 100644 --- a/docs/manual/rewrite/tech.html.en +++ b/docs/manual/rewrite/tech.html.en @@ -67,11 +67,12 @@ and URL matching.

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 directory path before appling the rules. (See the - RewriteBase directive to - see how you can further manipulate how this is handled.) If a substitution - is made, a new internal subrequest is issued with the new URL, which restarts - processing of the request phases. In this context, care must be taken to + by stripping off the directory path (including a trailing slash) + before applying the rules. ) If a substitution is made, 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. + 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. (See RewriteLooping diff --git a/docs/manual/rewrite/tech.xml b/docs/manual/rewrite/tech.xml index b341492143..e1d519aee8 100644 --- a/docs/manual/rewrite/tech.xml +++ b/docs/manual/rewrite/tech.xml @@ -77,11 +77,13 @@ and URL matching.

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 directory path before appling the rules. (See the - RewriteBase directive to - see how you can further manipulate how this is handled.) If a substitution - is made, a new internal subrequest is issued with the new URL, which restarts - processing of the request phases. In this context, care must be taken to + by stripping off the directory path (including a trailing slash) + before applying the rules. ) If a substitution is made, 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. + 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. (See RewriteLooping -- 2.50.1