Answer the question
In order to leave comments, you need to log in
Why does $_SERVER['REQUEST_URI'] return /index.php?
$_SERVER['REQUEST_URI'] always returns /index.php.
for example, given a request
site.ru/test
and $_SERVER['REQUEST_URI'] instead of /test returns /index.php,
site/index.php/test instead of /index.php/test $_SERVER['REQUEST_URI'] returns /index. php
Answer the question
In order to leave comments, you need to log in
Probably the webserver overrides.
If you have a perversion in the form of nginx proxying to apache, then it is better to call php-fpm directly from nginx.
by the fact that uri is a request resource, and all requests end with index.php, everything behind it is QUERY_STRING, that is, parameters.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question