S
S
s4q2020-06-14 00:45:15
htaccess
s4q, 2020-06-14 00:45:15

How to make an HTML page like a 404 page in WordPress?

I have a 404.html file at the root of the site, the theme is TwentyTwenty. Deleted the 404.php file from the TwentyTwenty folder. In the .htaccess file, I specified "ErrorDocument 404 404.html", the .htaccess itself is also in the root folder. It would seem that everything should work, but no.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Yanchevsky, 2020-06-14
@deniscopro

I don't think this can be verified. You have a CNC there and all requests are sent to index.php, where WP decides whether such a page exists or not. The server is no longer involved in this and cannot issue 404.html.
Why not paste the html code in 404.php?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question