Fetching a string by parsing URL

Francis Daly francis at daoine.org
Fri Jul 24 22:53:38 UTC 2015


On Thu, Jul 23, 2015 at 03:32:26PM -0400, sudharshanr wrote:

Hi there?

> For some reason, I'm getting it as null. This is my config file:

What, specifically, are you getting as null? What response do you see
that you do not want to see?


If you make a request for /path1/one?name=two, what response do you want?

Is it http 503 with the content of the file /Desktop/error5x.html,
or something else?

Where does "one" and "two" come into the response that you want to get?


> However, if I update the location directive as below:
> 
> location ~*/error5x.html? {
> alias /Desktop/error5x.html?name=$arg_name&path=$last_path;
> }
> 
> I get a file not found error.

Yes; that is what you have told nginx to do. (Unless you have a file with
a name like /Desktop/error5x.html?name=two&path=one, which you probably
do not.)

If you can describe what you want to have happen, perhaps someone can
tell you how to tell nginx to get that to happen.

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list