Adding a global 404 handler that redirects to the main page.