Laravel没有从URL查询字符串中接收任何$ _GET变量.$ _GET和Input :: all()为空.
例:
example.app/ex/login.php?country=US
"country = US"从未出现在我的$ _GET变量中
经过大量研究并尝试了许多不同的NGINX配置,我现在只能在使用此示例时生成结果.
例:
example.app/index.php/ex/login.php?country=US
$ _GET变量现在显示国家/地区名称值对.
允许URL中的查询字符串的正确配置是什么?
我的"example.app"的当前站点启用配置是......
server {
listen 80;
server_name example.app;
root /home/vagrant/Code/public;
index index.html index.htm index.php;
charset utf-8;
location / {
#try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
access_log off;
error_log /var/log/nginx/registration.app-error.log error;
error_page 404 /index.php;
sendfile off;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params; …Run Code Online (Sandbox Code Playgroud)