Answer the question
In order to leave comments, you need to log in
Why is $_SERVER['REQUEST_URI'] grabbing extra urls?
I do an Insert into the base of the current url, in addition to it, a link to the favicon and some banners climbs.
I tried to make an exception for these links - nothing changes
. What could be the problem
Answer the question
In order to leave comments, you need to log in
Most likely on the server (apache, nginx) there is a redirect to your script (rewrite) if the file is not found, and you write all requests in a row.
In your web server rules, redirect requests for static (CSS and images) to PHP. Just give 404 Page Not Found.
For example, for the nginx web server, conditionally:
# Не перенаправлять запросы про несуществующие статические файлы в PHP
location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|woff|ttf|eot|svg)$ {
root /var/www/applicaion; # путь к приложению
access_log off; # логи не писать
try_files $uri =404; # не вызывать PHP
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question