Thanks Francis, that is an interesting approach (with a map). Will give it a try. And good point on only allowing pre-defined patterns to be passed from arg to root.by ulik - Nginx Mailing List - English
Here is what I want to do, in nginx conf language: server { listen 80; server_name www.example.com; # root when path query arg is present if ($arg_path) { root /var/www/example/$arg_path; } # root when path query arg is not present (default) if (!$arg_path) { root /var/www/example/default; } }by ulik - Nginx Mailing List - English
Is it possible to set/modify location based on the query string arg from request? Here is the scenario: Request: www.example.com/demo?path=abc Docroot: /var/www/example/abc/ Request: www.example.com/demo?path=xyz Docroot: /var/www/example/xyz/by ulik - Nginx Mailing List - English