From b51536b7df3029320d6ca8450b98de5205243ceb Mon Sep 17 00:00:00 2001 From: "Ralf S. Engelschall" Date: Wed, 25 Feb 1998 15:42:58 +0000 Subject: [PATCH] Ops, we have totally mis-documented the %{LA-U:xxx} and %{LA-F:xxx} constructs, thus no one noticed that it can be used to lookup the REMOTE_USER variable (one of the mod_rewrite FAQs) even in per-server context. One just has to use %{LA-U:REMOTE_USER} instead of %{REMOTE_USER} there. Notice that %{REMOTE_USER} is also useful, but only for per-dir context. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@80320 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/mod/mod_rewrite.html | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/docs/manual/mod/mod_rewrite.html b/docs/manual/mod/mod_rewrite.html index 96943d6104..2cb8b4ca69 100644 --- a/docs/manual/mod/mod_rewrite.html +++ b/docs/manual/mod/mod_rewrite.html @@ -774,14 +774,24 @@ from the HTTP request. Example: %{HTTP:Proxy-Connection} is the value of the HTTP header ``Proxy-Connection:''.

-

  • There is the special format: %{LA-U:url} -for look-aheads like -U. This performs a internal sub-request to -look-ahead for the final value of url. - -

    -

  • There is the special format: %{LA-F:file} -for look-aheads like -F. This performs a internal sub-request to -look-ahead for the final value of file. +
  • There is the special format %{LA-U:variable} for look-aheads +which perform an internal (URL-based) sub-request to determine the final value +of variable. Use this when you want to use a variable for rewriting +which actually is set later in an API phase and thus is not available at the +current stage. For instance when you want to rewrite according to the +REMOTE_USER variable from within the per-server context +(httpd.conf file) you have to use %{LA-U:REMOTE_USER} +because this variable is set by the authorization phases which come +after the URL translation phase where mod_rewrite operates. On the +other hand, because mod_rewrite implements its per-directory context +(.htaccess file) via the Fixup phase of the API and because the +authorization phases come before this phase, you just can use +%{REMOTE_USER} there. + +

    +

  • There is the special format: %{LA-F:variable} which perform an +internal (filename-based) sub-request to determine the final value of +variable. This is the most of the time the same as LA-U above.

    -- 2.50.1