Snippets, Troubleshooting, Tutorials

Redirect to homepage when page not found

This is a lazy fix to redirect any url that doesn’t exist (resulting in 404) to the homepage.

Add the following line of code into the .htaccess file inside the root directory of your website.

ErrorDocument 404 /
Career Guide for Software Developers