httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jsl...@gmail.com>
Subject Re: [users@httpd] apache2 REQUEST_FILENAME
Date Fri, 29 Apr 2005 13:19:10 GMT
On 4/29/05, ovar <0var@centrum.cz> 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]

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message