A
A
azesmhook2018-08-29 17:39:53
Nginx
azesmhook, 2018-08-29 17:39:53

Why is NGINX giving its own 404 instead of the 404.php template and how to fix it?

There is a 404.php file on the site in the theme, but for any non-existent url, nginx issues its own 404, and does not load 404.php
.htaccess:
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{ REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
ErrorDocument 404 /index.php?error=404
Can anyone tell me what could be wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anatoly, 2018-08-29
@azesmhook

The thing is, Nginx doesn't work with htaccess.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question