First of all, you're gonna want to add this code to the last line on your .htaccess file.
Now, you want to create a new page, called 'filenotfound.php' and add this code to it.
Now, upload the filenotfound.php file to your main website's directory.
Then, create a new template on your main theme with the name 404 and add this to it:
Edit where it says Your 404 Page Content to whatever suits your needs.
Code
ErrorDocument 404 /filenotfound.phpNow, you want to create a new page, called 'filenotfound.php' and add this code to it.
Code
<?php define('IN_MYBB', 1);
require_once("global.php");
add_breadcrumb("404 Error", $_SERVER['PHP_SELF']);
eval("\$page = \"".$templates->get("404")."\";");
output_page($page);
?>Now, upload the filenotfound.php file to your main website's directory.
Then, create a new template on your main theme with the name 404 and add this to it:
Code
<html>
<head>
<title>Your title</title>
{$headerinclude}
</head>
<body>
{$header}
Your 404 Page Content
{$footer}
</body>
</html>Edit where it says Your 404 Page Content to whatever suits your needs.


![[Image: YFNJZfM.gif]](https://i.imgur.com/YFNJZfM.gif)