Welcome! Log In Create A New Profile

Advanced

Re: Is there a bug in QUERY_STRING or try_files?

December 25, 2009 03:06AM
On Fri, Dec 25, 2009 at 2:52 PM, seaprince <nginx-forum@nginx.us> wrote:
> Hello all,
>
> I found a problem when using try_files, it seems a tiny bug here.
>
> Configuration section:
>
> location / {
>    root   /home/tee/abc.com;
>    try_files $uri /t.php;
> }
>
>
> other configuration sections like fastcgi settings are omitted. In t.php file, I have some lines of code there:
>
> <?php
> var_dump($_GET['q']);
> print_r($_SERVER);
>
>
> Now we will try to visit the site http://abc.com/search/?q=test
> $_SERVER['QUERY_STRING'] should be q=test and $_GET['q'] should be test as usual.
>
> BUT, we will see $_SERVER['QUERY_STRING'] and $_GET['q'] are both empty here.
>
> Is it a bug or configuration error?
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,33365,33365#msg-33365
>
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx
>

I believe it should be
try_files $uri /t.php?$args;

--
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org

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

Is there a bug in QUERY_STRING or try_files?

seaprince December 25, 2009 02:52AM

Re: Is there a bug in QUERY_STRING or try_files?

seaprince December 25, 2009 02:58AM

Re: Is there a bug in QUERY_STRING or try_files?

edogawaconan December 25, 2009 03:06AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 307
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