Create a file called .htaccess in the root of your public_html/htdocs of your domain.

Inside add the following text:
[code lang=”c”]
Options +FollowSymLinks
AddDefaultCharset UTF-8
RewriteEngine on
Options +FollowSymLinks
AddDefaultCharset UTF-8
RewriteEngine on

ErrorDocument 404 /index.php
ErrorDocument 301 /index.php
[/code]

With the index.php files being the pages that get redirected to.