Project

General

Profile

[Solved] setenv with URI-Query

Added by vlrk over 2 years ago

Hi All,

I want to set the uri-query into one environment variable.
I see that mod_setenv can be used with setenv.add-environemnt.

I want use below URI-query into one environment variable.

(response.c.430) URI-query : QUERY_STRING=999

But not able to find like how we get this value of uri-query in the lighttpd.conf to use.
I tried using like : setenv.add-environment = ("URI_QUERY" => $HTTP["url.query"])

throwing error like below.

"(configfile.c.2162) source: lighttpd.conf line: 29 pos: 45 parser failed somehow near here: $"

This is same line number where above setenv config parameter is there.

Is this feasible , if yes any inputs will be highly appreciated.

lighttpd version : 1.4.66

Thanks
Rama Kanth


Replies (1)

RE: setenv with URI-Query - Added by gstrauss over 2 years ago

First step: read the documentation: WikiStart
You are making multiple mistakes with lighttpd syntax, suggesting you have never looked at the documentation for lighttpd.conf syntax.

QUERY_STRING is already provided in the CGI environment.

If you need to do something more arbitrary, then use mod_magnet with custom lua scripts.

    (1-1/1)