move rewrite rule to inside (outer) location instead of in php location

This commit is contained in:
Boudewijn 2025-03-02 19:14:28 +01:00
parent fb517aff32
commit 960cf6e0c0

View file

@ -1,5 +1,7 @@
location / {
alias __INSTALL_DIR__/public/;
# try redirecting stuff to index.php
rewrite ^(.*)$ /index.php$1 last;
index index.php;
client_max_body_size 256M;
@ -8,8 +10,6 @@ location / {
try_files $uri $uri/ /index.php?$query_string;
location ~ [^/]\.php(/|$) {
# try redirecting stuff to index.php
rewrite ^(.*)$ /index.php$1 last;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
#fastcgi_pass unix:/var/run/php/php__PHP_VERSION__-fpm-__APP__.sock;
fastcgi_pass unix:/var/run/php/php__PHP_VERSION__-fpm.sock;