This will allow you to create a custom 404 Page Not Found page that uses your vBulletin templates, and includes your vBulletin header, navbar, and footer. All without modifying any vBulletin files.
Create a new template named custom_404 and paste the following content into it. (Feel free to customize, of course.)
Then, create a file called 404.php in your site root, or forums root, and paste the following content into it. You will need to customize the code in red to point to the physical location of the misc.php file that comes with vBulletin.
Then, in your vBSEO Control Panel, for the "File Not Found" requests handling? setting, enter the following. Again, you will need to customize this to point to the actual physical location of the 404.php file that you created in the previous step.
Create a new template named custom_404 and paste the following content into it. (Feel free to customize, of course.)
HTML:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<!-- no cache headers -->
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="-1" />
<meta http-equiv="Cache-Control" content="no-cache" />
<!-- end no cache headers -->
$headinclude
<title>Page Not Found - <phrase 1="$vboptions[bbtitle]"></title>
</head>
<body>
$header
$navbar
<br />
<div style="padding-left: 25px; padding-right: 25px; font-weight: bold;" align="center">
Sorry, the page you have requested cannot be found.
<br/><br/>
You can try a <a href="$vboptions[bburl]/search.php">search</a> if you are looking for something specific.
</div>
$footer
</body>
</html>
Then, create a file called 404.php in your site root, or forums root, and paste the following content into it. You will need to customize the code in red to point to the physical location of the misc.php file that comes with vBulletin.
Code:
<?php
header("HTTP/1.0 404 Not Found");
header("Status: 404 Not Found");
$_GET['do']='page';
$_REQUEST['do']='page';
$_GET['template']='404';
$_REQUEST['template']='404';
define('VBSEO_PREPROCESSED', 1);
include ' [color=Red]/usr/home/username/public_html/forums/misc.php[/color] ';
?>
Code:
[color=red]/usr/home/username/public_html/404.php[/color]