Fetching a string by parsing URL

sudharshanr nginx-forum at nginx.us
Wed Jul 22 06:17:48 UTC 2015

Edho Arief: Thanks, but I think I need to rephrase my question. Right now,
my nginx.conf looks like this:

             location ~*/path1/{
                     if (-f $document_root/error503.html) {
                          return 503;

           error_page 503
<path_to_static_file>?arg1=$arg_queryparam1&arg2=<last path from url>

As you can see, if there is a 503 error, then I return a static file. The
arguments to the static file are 
         1. the param from url whose name is queryparam1, 
         2. the last path from the url

Now how do I fetch the last path from the url and pass it as a param to the
static file? I'm new to Nginx, so I might not have understood what you
meant. Or is what I'm doing completely wrong?


Posted at Nginx Forum: http://forum.nginx.org/read.php?2,260458,260461#msg-260461

More information about the nginx mailing list