Is there a bug in QUERY_STRING or try_files?

seaprince nginx-forum at
Fri Dec 25 10:52:46 MSK 2009

Hello all,

I found a problem when using try_files, it seems a tiny bug here.

Configuration section:

location / {
    root   /home/tee/;
    try_files $uri /t.php;

other configuration sections like fastcgi settings are omitted. In t.php file, I have some lines of code there:


Now we will try to visit the site
$_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:,33365,33365#msg-33365

More information about the nginx mailing list