How to Redirect 404 to Homepage using . htaccess
- Open .htaccess file. You will typically find .htaccess file in your site's root folder (e.g /var/www/html/). You can open it using vi editor $ sudo vim /var/www/html/.htaccess. ...
- Redirect 404 to Homepage using . htaccess. ...
- Restart Apache Server. Restart Apache Server to apply changes $ sudo service apache2 restart.