Binary package hint: apache2
According to http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewriterule it should work like that:
file-system path
Designates the location on the file-system of the resource to be delivered to the client.
URL-path
A DocumentRoot-relative path to the resource to be served. Note that mod_rewrite tries to guess whether you have specified a file-system path or a URL-path by checking to see if the first segement of the path exists at the root of the file-system. For example, if you specify a Substitution string of /www/file.html, then this will be treated as a URL-path unless a directory named www exists at the root or your file-system, in which case it will be treated as a file-system path. If you wish other URL-mapping directives (such as Alias) to be applied to the resulting URL-path, use the [PT] flag as described below.
TEST CASE:
1. Create a .htaccess file with the following lines, for e.g. http://localhost/:
RewriteEngine On
RewriteRule foo /tmp/bar.tmp
2. touch /tmp/bar.tmp
3. Access http://localhost/foo
ACTUAL RESULT:
You get an error page "The requested URL /tmp/bar.tmp was not found on this server.", because the substitution gets interpreted as URL relative to DocumentRoot
EXPECTED:
The file /tmp/bar.tmp gets served.
RewriteLog (at level 9):
[rid#8401900/initial] (2) init rewrite engine with requested uri /foo
[rid#8401900/initial] (1) pass through /foo
[rid#8401900/initial] (3) [perdir /var/www/] strip per-dir prefix: /var/www/foo -> foo
[rid#8401900/initial] (3) [perdir /var/www/] applying pattern 'foo' to uri 'foo'
[rid#8401900/initial] (2) [perdir /var/www/] rewrite 'foo' -> '/tmp/bar.tmp'
[rid#8401900/initial] (1) [perdir /var/www/] internal redirect with /tmp/bar.tmp [INTERNAL REDIRECT]
[rid#840bfe0/initial/redir#1] (2) init rewrite engine with requested uri /tmp/bar.tmp
[rid#840bfe0/initial/redir#1] (1) pass through /tmp/bar.tmp
[rid#840bfe0/initial/redir#1] (3) [perdir /var/www/] add path info postfix: /var/www/tmp -> /home/da
[rid#840bfe0/initial/redir#1] (3) [perdir /var/www/] strip per-dir prefix: /var/www/tmp/bar.tmp -> t
[rid#840bfe0/initial/redir#1] (3) [perdir /var/www/] applying pattern 'foo' to uri 'tmp/bar.tmp'
[rid#840bfe0/initial/redir#1] (1) [perdir /var/www/] pass through /var/www/tmp
Confirmed. Happening for me too.