Nginx的try_files不工作,redirect到302

我需要访问下面的url。

HTTP://localhost/admin/logout.php/ =的access_token&21fd3cfe5bab26131ff5244c08e5f520继续= /

在我的NGINX服务器上,它将我redirect到默认页面。 请在下面find我的configuration:1stconfiguration尝试##########

location / { try_files $uri $uri/ /index.php; } 

第二次configuration尝试##########

 location / { #try_files $uri $uri/ /index.php?q=$uri&$args; } 

注意:它(脚本)在Apache服务器上工作。

更新 ::::::::::::::::::::::::::::::::::::::

.conf文件

 server { server_name test.test.com www.test.test.com; access_log /home/log/access.log combcomed buffer=256k flush=60m; error_log /home/log/error.log; root /home/public; location ~ (?:^|/)\. { deny all; } location / { #try_files $uri $uri/ /index.php; try_files $uri $uri/ /index.php?q=$uri&$args; } include /usr/local/nginx/conf/staticfiles.conf; include /usr/local/nginx/conf/php.conf; include /usr/local/nginx/conf/drop.conf; include /usr/local/nginx/conf/vts_server.conf; } 

Http响应:

 HTTP/1.1 302 Moved Temporarily Date: Fri, 18 Aug 2017 14:55:04 GMT Content-Type: text/html Connection: keep-alive Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Location: /admin/main.php Server: nginx centminmod Content-Length: 5687