Best way to get $request_filename
mdounin at mdounin.ru
Wed Jul 15 23:37:56 MSD 2009
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)
More information about the nginx