Welcome! Log In Create A New Profile

Advanced

Re: Set location based on query arg

Francis Daly
November 10, 2016 05:22PM
On Thu, Nov 10, 2016 at 03:04:43PM -0500, ulik wrote:

Hi there,

> Is it possible to set/modify location based on the query string arg from
> request?

The one-word answer is "no".

So the follow-up question is: what do you want to do?

> Here is the scenario:
>
> Request: www.example.com/demo?path=abc
> Docroot: /var/www/example/abc/

What would you like nginx to do with that request, that somehow involves
Docroot?

Serve a specific file from the filesystem? Make a fastcgi request to an
upstream including a particular key/value pair? Something else?

> Request: www.example.com/demo?path=xyz
> Docroot: /var/www/example/xyz/

And what would you like nginx to do with *that* request, that is different
from the previous one?

Perhaps the thing that you want achieved, can be achieved somehow.

f
--
Francis Daly francis@daoine.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Set location based on query arg

ulik November 10, 2016 03:04PM

Re: Set location based on query arg

Francis Daly November 10, 2016 05:22PM

Re: Set location based on query arg

ulik November 10, 2016 06:46PM

Re: Set location based on query arg

Francis Daly November 11, 2016 03:32AM

Re: Set location based on query arg

Francis Daly November 11, 2016 03:42AM

Re: Set location based on query arg

ulik November 11, 2016 12:34PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 90
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready