Forum Moderators: coopster
<?php
/*
Use the following link format:
<a href="goto.php?p=XXXXXX">XXXXXX</a>
*/
$p = $_GET['p'];
switch ($p)
{
/*link1*/
case "link1":
$link = "/link1.htm";
break;
/*link2*/
case "link1":
$link = "/link2.htm";
break;
/*Default*/
default:
$link = "/default.htm";
}
header('Content-Type: text/html; charset=utf-8');
header("X-Robots-Tag: noindex, nofollow, noarchive", true);
header("Location: $link"); // URL
exit();
?>
$p = $_GET['p'];
$link = array(
'first'=>'/link1.htm',
'second'=>'/link2.htm',
);
/*Send Headers*/
header('Content-Type: text/html; charset=utf-8');
header('X-Robots-Tag: noindex, nofollow, noarchive', true);
if (isset($link[$p]))
{
header('Location: '.$link[$p]); // Valid URL
}
else
{
header('Location: /default.htm'); // Invalid URL
}
exit();
?>