Milad
04-27-2008, 10:00 PM
Brought to you by Syrian Medical Society (http://www.syrianmeds.net/) & Milado (http://www.milado.net/)
Introduction & Description:
Sometimes, for a reason or another, MySQL server halts and vBulletin prints the MySQL error!
But Google will still index your pages even if they contain that error rather than the actual content!
What if that error lasts for many hours? many pages will get indexed during this breakdown, and will be replaced (if already indexed) with a no-content-but-a-MySQL-error page!
Here is a solution which will work for all vBulletin versions through the three generations (3.0 3.5 and 3.6)!
We will send a 503 error "Service Temporarily Unavailable" header, and Google will understand the message, and refrain from indexing your pages.
Installation for 3.7.x:
No need! this is already implemented (http://www.vbulletin.com/forum/showthread.php?t=230053) in 3.7.x generation!
Installation for 3.5.x and 3.6.x:
In includes/class_core.php find:
die($message);
Add before it the following:
header('HTTP/1.1 503 Service Temporarily Unavailable');
header('Status: 503 Service Temporarily Unavailable');
header('Retry-After: 3600');
Installation for (3.0.x):
In includes/db_mysql.php find:
echo "<html><head><title>$vboptions[bbtitle] Database Error</title>";
Add before it the following:
header('HTTP/1.1 503 Service Temporarily Unavailable');
header('Status: 503 Service Temporarily Unavailable');
header('Retry-After: 3600');
A comment:
It won't be simpler! no way to do this via plug-ins, as the MySQL error probably will prevent vBulletin from getting the plug-ins from the database!
To check how many database errors had been indexed by Google, use the following query:
site:syrianmeds.net "Database error"
replace syrianmeds.net with your site domain name!
Change log:
1.0.0 first public release, on April, 28 2008
Click install to receive support & updates.
You like it? nominate it.
Introduction & Description:
Sometimes, for a reason or another, MySQL server halts and vBulletin prints the MySQL error!
But Google will still index your pages even if they contain that error rather than the actual content!
What if that error lasts for many hours? many pages will get indexed during this breakdown, and will be replaced (if already indexed) with a no-content-but-a-MySQL-error page!
Here is a solution which will work for all vBulletin versions through the three generations (3.0 3.5 and 3.6)!
We will send a 503 error "Service Temporarily Unavailable" header, and Google will understand the message, and refrain from indexing your pages.
Installation for 3.7.x:
No need! this is already implemented (http://www.vbulletin.com/forum/showthread.php?t=230053) in 3.7.x generation!
Installation for 3.5.x and 3.6.x:
In includes/class_core.php find:
die($message);
Add before it the following:
header('HTTP/1.1 503 Service Temporarily Unavailable');
header('Status: 503 Service Temporarily Unavailable');
header('Retry-After: 3600');
Installation for (3.0.x):
In includes/db_mysql.php find:
echo "<html><head><title>$vboptions[bbtitle] Database Error</title>";
Add before it the following:
header('HTTP/1.1 503 Service Temporarily Unavailable');
header('Status: 503 Service Temporarily Unavailable');
header('Retry-After: 3600');
A comment:
It won't be simpler! no way to do this via plug-ins, as the MySQL error probably will prevent vBulletin from getting the plug-ins from the database!
To check how many database errors had been indexed by Google, use the following query:
site:syrianmeds.net "Database error"
replace syrianmeds.net with your site domain name!
Change log:
1.0.0 first public release, on April, 28 2008
Click install to receive support & updates.
You like it? nominate it.