Hello,
I have two sites where I use the following writing rules in:
/home/admin/conf/web/yourdomain.com/nginx.conf_redirect
if ($host != "domain.com") {
return 301 $scheme://domain.com$request_uri;
}
`client_max_body_size 5G;`
` # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000`
` location ~ \.php$ {`
` if (!-e $request_filename) { rewrite ^/(.*) /index.php?_page_url=$1 last; }`
` fastcgi_pass unix:/run/php/php8.0-fpm-php8.domain.com.sock;`
` fastcgi_index index.php;`
` fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;`
` fastcgi_param MOD_X_ACCEL_REDIRECT_ENABLED on;`
` include /etc/nginx/fastcgi_params;`
` }`
` #location / {`
` if (!-e $request_filename) {`
` rewrite ^/(.*) /index.php?_page_url=$1 last;`
` }`
` #}`
` location /files/ {`
` internal;`
` }`
` # these locations would be hidden by .htaccess normally`
` location /logs/ {`
` deny all;`
` }`
But after the addition of writing rules no longer works with me visitor statistics, where I see error 404
How can I fix that?