Best way to get $request_filename
maccaday at gmail.com
Thu Jul 16 02:28:13 MSD 2009
Maxim Dounin wrote:
> On Wed, Jul 15, 2009 at 10:13:26PM +0300, Marcus Clyne wrote:
>> What's the best way to get the variable $request_filename from a custom
>> Currently I save the index of the $request_filename variable and call
>> ngx_http_get_indexed_variable (r, request_filename_var_index), but is
>> there a better way?
> If you need variable - using indexed one is the best choise.
> For request filename you may want to consider using
> ngx_http_map_uri_to_path() directly though. See static module (or
> gzip static, or flv, or request_filename variable get handler code)
> for examples.
> Maxim Dounin
More information about the nginx