Answer the question
In order to leave comments, you need to log in
How to remove empty pages when requesting Nginx to index.php?
I noticed strange behavior in Nginx when going to any links with the addition of index.php at the end.
Even if, for example, the folder does not exist (www.site.ru/ggg/index.php), then an empty page is displayed instead of 404.
I suspect that this is somehow related to this part of the config:
location / {
# try_files $uri $uri/ ;
limit_req zone=php2zone burst=5 nodelay;
try_files $uri $uri/ /index.php?q=$uri&$args;
}
location ~ \.php$ {
limit_req zone=php2zone burst=5 nodelay;
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question