Question, will this work with the vBerror page mod? I know at one time the incoming links redirect was working but its not now.
I have vBerror pages 1.0 installed currently.
I have vBerror pages 1.0 installed currently.
This section is an archive with no posting allowed. The software represented in this forum is no longer supported or updated. If you need help upgrading to a newer version of vBulletin please open a support ticket. You can also post in the section supporting the upgrade version you're planning to use.
We are sorry for any inconvenience this may cause.
Welcome to the vBulletin support forums! In our community forums you can receive professional support and assistance with any issues you might have with your vBulletin Products.
Useful Links for Guests:
If you are having problems posting in the relevant areas for your software, please see this topic.
[SIZE=2] <? $dbhost1 = 'localhost'; $dbusername1 = 'username'; $dbuserpassword1 = 'password'; $vbul1 = mysql_pconnect($dbhost1, $dbusername1, $dbuserpassword1); if (!$vbul1) { die('Could not connect: ' . mysql_error()); } mysql_select_db("vbulletin",$vbul1); $count=0; $step = 1000; $query=mysql_query("SELECT importthreadid FROM thread ORDER BY importthreadid DESC LIMIT 1"); $row=mysql_fetch_row($query); $total=$row[0]; while ($count<$total) { $query=mysql_query("SELECT importthreadid,threadid FROM thread WHERE importthreadid>$count AND importthreadid<$count+$step"); $result=""; while ($row=mysql_fetch_array($query)) { $result .= serialize($row); $result .="\n"; } $cachefile="/www/forum/converter/".$count.".php"; // open the cache file for writing $fp = @fopen($cachefile, 'w'); // save the contents of output buffer to the file @fwrite($fp, $result); // close the file @fclose($fp); $count += $step; } ?>[/SIZE]
[SIZE=2]// Converter Start
if ($_GET['showtopic'])
{
$showtopic=$_GET['showtopic'];
$file=floor($showtopic/1000)*1000;
$cachefile="/www/forum/converter/".$file.".php";
$dados=file($cachefile);
while (list($key,$value) = each($dados))
{
$row=unserialize($value);
$importthreadid=$row['importthreadid'];
$threadid=$row['threadid'];
if ($importthreadid==$showtopic)
{
break;
}
}
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://forum.clubedohardware.com.br/showthread.php?t=".$threadid);
exit();
}
// Converter End
Then I added the following code at the beginning of my index.php:
[SIZE=2]
<?
$url=$_SERVER['REQUEST_URI'];
$result=explode("/lofiversion/index.php/t",$url);
$result=explode(".html",$result[1]);
$showtopic=$result[0];
if ($showtopic)
{
$file=floor($showtopic/1000)*1000;
$cachefile="/www/forum/converter/".$file.".php";
$dados=file($cachefile);
while (list($key,$value) = each($dados))
{
$row=unserialize($value);
$importthreadid=$row['importthreadid'];
$threadid=$row['threadid'];
if ($importthreadid==$showtopic)
{
break;
}
}
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://forum.clubedohardware.com.br/showthread.php?t=".$threadid);
}
else
{
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://forum.clubedohardware.com.br");
}
?>
And also created the file below and saved as index.php under /lofiversion:
if ($debug)
{
echo "<html><head><title>404 debug</title></head><body>";
echo "<br>Action :: " . $action;
echo "<br>SQL :: " . $sql;
echo "<br>REQUEST_URI :: " . $_SERVER['REQUEST_URI'] ;
echo "</body></html>";
die;
}
if (!$action)
{
?>
<html>
<head>
<meta http-equiv="refresh" content="<? echo $refresh_speed; ?>;URL=<? echo $standard_404; ?>">
</head>
<body>
</body>
</html>
<?
<h1>Page Not Found</h1> <p>If you are reading this, then you have META-REFRESH disabled in your browser's internet settings.</p><p>The page you requested could not be found. It has either never existed, been removed or moved to another path or filename.</p><p>Please try navigating to the information you want from the site's <a href="http://www.[i]yourdomaingoeshere[/i].com/">home page</a>. There is a search function available for finding information in the forums.</p>
Comment