Unable to create custom error 404

Hello. I want to create a custom error 404 page, but when I modify the .htaccess file as explained at How To Create a Custom 404 Page in Apache | DigitalOcean, my ojs stops working. I really need to make some redirects because I changed the domain and there are lots of missing pages.
Please help.

@ Ana, you can try this simple solution.