[Techtalk] Apache mod_rewrite

Dan dan at cellectivity.com
Fri Apr 22 00:03:17 EST 2005


Hi everyone.

I'm playing with mod_rewrite in Apache2. The documentation says that the
variable %{REQUEST_FILENAME} is "The full local filesystem path to the
file or script matching the request." But that's not the case on my
system.

Using this rule:
RewriteRule  ^.*$   /admin/debug?filename=%{REQUEST_FILENAME}

I redirect the request to a script that outputs debug information. And
it confirms that %{REQUEST_FILENAME} is the local path (relative to the
document root be still prefixed with a slash).

What's going on?

-- 
  Never ascribe to malloc() that which can adequately be explained
  by stupidity.
       - Jim Greenly, professor at Georgia Institute of Technology




More information about the Techtalk mailing list