Welcome! Log In Create A New Profile

Advanced

Редирект на fpm всех несужествующих обращений к файлам .php

Posted by Khmelevsky 
Здравствуйте.
Есть конфиг:

.....
location / {
root /data/www/test.com/public;

try_files $uri $uri/ /index.php?route=$uri&$args;
index index.html index.php;
}

location ~ \.php$ {
root /data/www/test.com/public;

fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;

............
}

нужно сделать чтобы все урл типа /lalala.php, /wtf.php и т.д.(к файлам php которых нет) перенаправлялись на fpm /index.php?route=$uri&$args;
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 170
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready