Quote:
Originally Posted by Tomek
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).
Quote:
<?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();
}
|