Welcome! Log In Create A New Profile

Advanced

How to setup a location to use $_SERVER['QUERY_STRING']

Posted by Excision 
How to setup a location to use $_SERVER['QUERY_STRING']
March 25, 2016 08:06PM
Hello,

I am trying to learn how to use NGINX to use a RESTFUL app, however I had some troubles to find any good tutorial about it. I have configured my site like this:
http://pastebin.com/tTqgRzjn

I would like to pass two parameter to $_SERVER['QUERY_STRING'], for example If I have this url:
index.php/user/myname/

Then, the query string would have two arguments, one of them would be "user" and the second one would be "myname".

I heard that this could be done using fastcgi_params, but I don't know how to use it. I did some searches in Google, but I didn't find any example to do it.

Could you explain me how to do it? Are there multiple approaches or is there only one way to do it? If there are multiple approaches, which one is the best to learn? Is there any book to learn about this?

Best regards.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 125
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready