I'm running Apache2 (2.0.43) and wanted to transparently send requests for PHP-processed files to an Apache1.3 instance, which runs PHP Accelerator (www.php-accelerator.co.uk). Naturally, I turned to mod_proxy and mod_rewrite. However, I (think I've) found a problem with either the docs or with mod_rewrite itself. Here's the ruleset I tried: RewriteEngine on RewriteCond %{REQUEST_FILENAME} \.php$ RewriteRule ^/+(.*)$ http://otherhost.horde.net/$1 [P,NE,L] Turning on a RewriteLog showed that %{REQUEST_FILENAME} contained the URI of the request, not the full local path as stated in the mod_rewrite docs (http://httpd.apache.org/docs-2.0/mod/mod_rewrite.html). However, I found that this ruleset works: RewriteEngine on RewriteCond %{LA-U:REQUEST_FILENAME} \.php$ RewriteRule ^/+(.*)$ http://otherhost.horde.net/$1 [P,NE,L] In order to get the full local path in %{REQUEST_FILENAME}, you have to force mod_rewrite to do a look-ahead with %{LA-U:REQUEST_FILENAME}. The kicker is that the docs go on at length about the difference between REQUEST_URI and REQUEST_FILENAME. I found these variables to be identical unless you force mod_rewrite to look ahead for REQUEST_FILENAME. I posted to apache-users, but didn't get any response after a few days and this doesn't seem to be reported already. Is this a bug in the docs, mod_rewrite, or am I just blowing hot air?
Okay, we should really better explain, when what variable is actually available, especially because it differs for server and directory context rules. ...it goes on my todo (if nobody else beats me before) ;-) Thanks for using Apache!
*** Bug 46376 has been marked as a duplicate of this bug. ***
*** Bug 45280 has been marked as a duplicate of this bug. ***
Is the clarification added by Eric Covener in r914980 / PR48796 enough to close this PR?
Works for me. (Seems like RESOLVED/FIXED is ok? Either that or RESOLVED/DUPLICATE of 48796.)