Custom 404 Page

by Mr_Joker - 15-06-2015, 09:10 AM
YouR JuSt G4Y
Posts:
879
Joined:
Feb 2015
Likes:
32
Credits:
301
Reputation:
3
2 Years of Service
#1
OP
Posted: 15-06-2015, 09:10 AM
First of all, you're gonna want to add this code to the last line on your .htaccess file.

Code:
ErrorDocument 404 /filenotfound.php

Now, 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.

Not my content don't come to me if shit doesn't work but it should Smile
We are!
Posts:
1,044
Joined:
Jan 2015
Likes:
107
Credits:
1,834
Reputation:
25
2 Years of Service
#2
Posted: 15-06-2015, 09:22 AM
or you can just create custom error pages in the cpanel.
Closed Account
Posts:
26
Joined:
Jun 2015
Likes:
0
Credits:
29
Reputation:
0
1 Year of Service
#3
Posted: 23-06-2015, 11:57 AM
I'll test on my administrator panel thanks Smile
The last reply on this thread is older than a month. Please do not unnecessarily bump it.
Register an account or login to reply
Create an account
Create a free account today and start posting right away. It only takes a few seconds.
Login
Log into an existing account.
1 Guest(s)