vBulletin Search Engine Optimization
This is a discussion on custom 404 Error Doc returns 200 OK within the Troubleshooting forums, part of the vBSEO SEO Plugin category; When specifying a 404 error document in vBSEO cp , the header returned for 404 errors is 200 OK This ...
| |||||||
Enhancing 80 million pages. | Register | FAQ | Members List | Social Groups | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| ||||
| ||||
| custom 404 Error Doc returns 200 OK
When specifying a 404 error document in vBSEO cp, the header returned for 404 errors is 200 OK This is far from ideal... I even have header("HTTP/1.0 404 Not Found"); in my 404 php file... Is vBSEO over-riding this? |
|
#2
| ||||
| ||||
| Re: custom 404 Error Doc returns 200 OK
Hello Rob, yes, the header should be sent from the included script and vBSEO doesn't prevent this. Make sure that header() is executed before the output starts.
__________________ Oleg Ignatiuk / Crawlability Inc. Support Team Launches New DeskPro Powered Tool Enhanced Support at Your Service vBSEO 3.2.0 Launched - Maximum Overdrive for Your Web Traffic! Over 100 Instant SEO Optimizations 6X Traffic - $1400 in One Day with vBSEO! Imagine What the vBSEO Patent Pending Technology Can Do For You. |
|
#3
| ||||
| ||||
| Re: custom 404 Error Doc returns 200 OK Quote:
Code: <?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', '404.php'); /
header("HTTP/1.0 404 Not Found");
// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array(
);
// get special data templates from the datastore
$specialtemplates = array(
);
// pre-cache templates used by all actions
$globaltemplates = array(
'404_error',
);
// pre-cache templates used by specific actions
$actiontemplates = array(
);
// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
$domain = $_SERVER['HTTP_HOST'];
$navbits = array();
$navbits[$parent] = 'Error 404 - Not Found';
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('404_error') . '");');
?>
|
|
#4
| ||||
| ||||
| Re: custom 404 Error Doc returns 200 OK
This script returns 404 in my case, may be it's related to vBulletin? Please try a simple case like: PHP Code:
__________________ Oleg Ignatiuk / Crawlability Inc. Support Team Launches New DeskPro Powered Tool Enhanced Support at Your Service vBSEO 3.2.0 Launched - Maximum Overdrive for Your Web Traffic! Over 100 Instant SEO Optimizations 6X Traffic - $1400 in One Day with vBSEO! Imagine What the vBSEO Patent Pending Technology Can Do For You. Last edited by Oleg Ignatiuk; 05-29-2006 at 05:18 PM. |
|
#5
| ||||
| ||||
| Re: custom 404 Error Doc returns 200 OK
fixed.... I put the header after the global.php include and now works properly.... thanks. |
|
#6
| ||||
| ||||
| Re: custom 404 Error Doc returns 200 OK
Great!
__________________ Oleg Ignatiuk / Crawlability Inc. Support Team Launches New DeskPro Powered Tool Enhanced Support at Your Service vBSEO 3.2.0 Launched - Maximum Overdrive for Your Web Traffic! Over 100 Instant SEO Optimizations 6X Traffic - $1400 in One Day with vBSEO! Imagine What the vBSEO Patent Pending Technology Can Do For You. |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Syntax for Custom Rewrite Rules | Joe Ward | Custom Rewrite Rules | 7 | 07-19-2008 07:14 AM |
| 404 and 200 Google problems | HappyDJ | URL Rewrite Settings | 2 | 05-09-2006 03:51 PM |
| vBSEO 2.0 RC7 Released | Juan Muriente | vBSEO Announcements | 17 | 09-09-2005 12:00 AM |