
nginx配置PHP,$_GET获取不到参数问题
在使用pathinfo地址时,我们要把这个请求都转向入口文件(index.php).nginx配置:
try_files $uri $uri /index.php$is_args
然后这个配置,请求没有带上地址?之后的数据. 改成以下两种配置即可:
try_files $uri $uri /index.php$is_args$args;
# OR
try_files $uri $uri /index.php$query_string;