Re: Fetching a string by parsing URL

2015-07-24 Thread Francis Daly
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 respo

Re: Fetching a string by parsing URL

2015-07-23 Thread sudharshanr
For some reason, I'm getting it as null. This is my config file: map $uri $last_path { ~*/(?[^/]+)/?$ $pathname; } server { listen 80; root /basefolder; error_page 500 501 502 503 504 = /error5x.html?name=$arg_name&path=$last_path; location ~*/error5x.html? { alias /Desktop/error5x.html; } loc

Re: Fetching a string by parsing URL

2015-07-23 Thread sudharshanr
For some reason, I'm getting it as null. This is my config file: map $uri $last_path { ~*/(?[^/]+)/?$ $pathname; } server { listen 80; root /basefolder; error_page 500 501 502 503 504 = /error5x.html?name=$arg_name&path=$last_path; location ~*/error5x.html? { alias /Desktop/error5x.html; } loc

Re: Fetching a string by parsing URL

2015-07-22 Thread sudharshanr
For some reason, I'm getting it as null. This is my config file: map $uri $last_path { ~*/(?[^/]+)/?$ $pathname; } server { listen 80; root /basefolder; error_page 500 501 502 503 504 = /error5x.html?name=$arg_name&path=$last_path; location ~*/error5x.html? { al

Re: Fetching a string by parsing URL

2015-07-22 Thread Edho Arief
On Thu, Jul 23, 2015 at 2:08 AM, sudharshanr wrote: > 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 ?arg1=$arg_queryparam1&arg2= from url> > > As you can

Re: Fetching a string by parsing URL

2015-07-22 Thread sudharshanr
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 ?arg1=$arg_queryparam1&arg2= As you can see, if there is a 503 error, then I return a static file. The arguments to the stat

Re: Fetching a string by parsing URL

2015-07-22 Thread Payam Chychi
On Tuesday, July 21, 2015 at 9:43 PM, sudharshanr wrote: > I have a web server sitting behind Nginx. If there is an error, then I want > to fetch some information from the url and pass it on to a static file as > parameters. I have configured Nginx to fetch the query parameters from the > url u

Re: Fetching a string by parsing URL

2015-07-21 Thread sudharshanr
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 5

Re: Fetching a string by parsing URL

2015-07-21 Thread Edho Arief
On Jul 22, 2015 11:43, "sudharshanr" wrote: > > I have a web server sitting behind Nginx. If there is an error, then I want > to fetch some information from the url and pass it on to a static file as > parameters. I have configured Nginx to fetch the query parameters from the > url using $arg_para

Fetching a string by parsing URL

2015-07-21 Thread sudharshanr
I have a web server sitting behind Nginx. If there is an error, then I want to fetch some information from the url and pass it on to a static file as parameters. I have configured Nginx to fetch the query parameters from the url using $arg_param_name. However, I also need to fetch a String from t