View Full Version : Archive redirect browsers to the thread
pgowder
09-01-2004, 05:39 PM
I love the archive in vB3.x. It has drastically increased our search engine ranking.
However users get confused when they search and see these pages.
Is there a way to have the page detect a real browser from a spider and re-direct them to the thread?
pgowder
09-02-2004, 07:02 PM
Anyone?
Tomek
04-02-2005, 11:07 AM
That would be interesting for me, too. *bump*
morrow
04-02-2005, 12:14 PM
That would be interesting for me, too. *bump*
See if this works. Simply name it, index.php and place it in your root.
I know there is also a way to do this via .htaccess too, but this is simple and I use it on my site (http://www.neflyfishing.net gets redirected to http://www.njflyfishing.com).
<?php
///////////////////////////////////////////////////////////////////////////
// Free Redirection Script By Only PHP www.onlyphp.com
///////////////////////////////////////////////////////////////////////////
$SETUP[siteurl] = "http://www.linknamehere.com/......";
if ($url) {
$lines_array = file($url);
$lines_string = implode('', $lines_array);
eregi("<head>(.*)</head>", $lines_string, $head);
?>
<html>
<head>
<title>Redirecting Now...</title>
<script LANGUAGE="JavaScript">
var VersionString = navigator.appVersion
if (navigator.appName == "Netscape") {
if (VersionString.substring(0,1) >= 1) {
// Netscape 3.0 (or later) browsers go to this location:
location = "<?php echo $url; ?>"
}
}
if (navigator.appName == "Microsoft Internet Explorer") {
if (VersionString.substring(0,1) >= 1) {
// Microsoft Internet Explorer users go to this location:
location = "<?php echo $url; ?>";
}
}
</script>
</head>
<body bgcolor=white>
<p><a href="<?php echo $url; ?>"></a>
</body>
</html>
<?php
exit();
} else {
header("Location: $SETUP[siteurl]");
exit();
}
noppid
04-02-2005, 01:06 PM
Redirects are bad IMO. They confuse users.
I'm no expert, but I'd say it would also negate the archives position in the SEs.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.