httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <>
Subject Re: [users@httpd] apache2 REQUEST_FILENAME
Date Fri, 29 Apr 2005 13:19:10 GMT
On 4/29/05, ovar <> wrote:
> > If I remember correctly, REQUEST_FILENAME is set only by mod_rewrite, so
> > RewriteEngine On
> > will probably activate it.
> Hm, didn't work for me. Empty even with "RewriteEngine On" (in appropriate virtualhost).
And I really don't see the place in sources where REQUEST_FILENAME is set.
> modules/ssl/ssl_engine_vars.c:                 strcEQ(var, "REQUEST_FILENAME"))
> modules/arch/netware/mod_nw_ssl.c:            else if (strcEQ(var, "REQUEST_FILENAME"))
> modules/mappers/mod_rewrite.c:             strcasecmp(var, "REQUEST_FILENAME") == 0 
) {
> These are just comparisons, right?

If you look at that section of the code in mod_rewrite, you'll see
that mod_rewrite makes that variable available to its
variable-expansion mechanism, but doesn't actually set it in the
environment.  Hence it is only available for mod_rewrite.

You may be able to force it into the environment, using something like

RewriteCond %{REQUEST_FILENAME} (.*)
RewriteRule .* - [E=REQUEST_FILENAME:%1]


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message