Thread Rating:
  • 4 Vote(s) - 3.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom 404 Page Creation For Mybb Without Any Plugin
#1
This user has been denied support. This user has been denied support.
1. Add this code to the last line on your .htaccess

ErrorDocument 404 /filenotfound.php

2.Create a file called filenotfound.php, and add this to it:

<?php 
    define('IN_MYBB', 1);
    require_once("global.php");

    add_breadcrumb("404 Error", $_SERVER['PHP_SELF']); 

    eval("\$page = \"".$templates->get("404")."\";"); 

    output_page($page);
?>

3. Upload the filenotfound.php file to your main website's directory.

4. Create a new template on your main theme with the name 404 and add this to it:


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


Credits:Ocean
<snip>
Reply
#2
Thanks, appreciate this.
Reply
#3
Thanks Mate, i really need this,
regards,
[Image: mnvhXxj.png]
Reply
#4
Same, appreciate it. Nice one!
Reply
#5
This user has been denied support. This user has been denied support.
thank you guyz but this is not my tutorial i am just sharing coz today i was looking for it very badly Toungue
<snip>
Reply
#6
whether it could use a costume picture? Big Grin
[Image: sundi3yansyah@github.jpg]
Reply
#7
(01-20-2013, 08:44 PM)SunDi3yansyah Wrote: whether it could use a costume picture? Big Grin

Yes, just put the image in the template.

<img src="/images/whatever.png" />
Please don't PM me for support. Smile
Reply
#8
okay this successfully, without any constraints

demo my site Toungue
www.kampoeng.us/pagenotfound
[Image: sundi3yansyah@github.jpg]
Reply
#9
This user has been denied support. This user has been denied support.
(01-22-2013, 02:32 AM)SunDi3yansyah Wrote: okay this successfully, without any constraints

demo my site Toungue
www.kampoeng.us/pagenotfound

yeah i've also made custom 404 error

http://forums.walletsavings.com/notfound.php
<snip>
Reply
#10
I've heard using .htaccess would decrease perfomance !!

Is that right ?
[Image: 8U2i7MM.png]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)