Describe the issue or problem
How to redirect the 404 Not Found page to the homepage URL?
Does it possible with small code modification or using .htaccess file?
Let me start saying this is not an PKP issue… it’s related with your webserver configuration and need to be covered by you sysadmins or by the hosting service.
Said that, let’s see if we can help you.
You talk about .htaccess so let’s assume you are using apache2 (for future posts, specify the versions of your stack helps to clarify).
First of all, if you didn’t do it before, you will need to tell apache2 to read .htaccess files.
For this, you need to edit the default virtualhost adding the “AllowOverride All” directive (and restart/reload your apache).
Try to do this and then, add a sample htaccess in a testing folder to be sure apache is reading htaccess.
If you only want to do a 404 redirection to your ojs’s home, the fastest way is to define the “404 error page” and redirect it to index.php in your OJS root adding this to your default’s virtualhost or htaccess: